我有如下数据:
# Data
varx1 <- data.frame(datex = c("2018/01/01","2018/01/02","2018/01/03"), x = c(101,102,103))
varx2 <- data.frame(datex = c("2018/01/01","2018/01/02","2018/01/03","2018/01/04","2018/01/05"), x = c(10,11,12,13,14))
varx3 <- data.frame(datex = c("2018/01/01"), x = c(1000))
combination <- list(`code status OK01` = varx1, `code trx OCS02` = varx2, `Revenue 101` = varx3)
combination
我想得到这样的结果:
# Result
result <- data.frame(datex = c("2018/01/01","2018/01/02","2018/01/03","2018/01/01","2018/01/02","2018/01/03","2018/01/04","2018/01/05","2018/01/01"),
combination = c("code status OK01","code status OK01","code status OK01","code trx OCS02","code trx OCS02","code trx OCS02","code trx OCS02","code trx OCS02","Revenue 101"),
x = c(101,102,103,10,11,12,13,14,1000))
result
需要此问题的帮助。谢谢