I have a list of names and list of table which create in ReporteRs
packages, called "MyFTable", I tried to apply list of MyFTable with list of t
t1 <- c("a","b","c")
t2 <- c("d","e","f")
t <- list(t1, t2)
If I do separately, it works, but when I put in the loop, it doesn't work.
addHeaderRow(MyFTable[[1]], value=c("", t1))
addHeaderRow(MyFTable[[2]], value=c("", t2))
This is my attempt:
for(i in 1: length(MyFTable)){
lapply(MyFTable[[i]],function(x) addHeaderRow(x, value=c("",t[[i]])))
}
for(i in 1: length(MyFTable)){
lapply(MyFTable[[i]],function(x) addHeaderRow(x[[i]], value=c("",t[[i]])))
}
I got error :
x must be a FlexTable
Thanks for your advice.