I'm compiling knitr document from a .R file:
knit2pdf(example.Rnw, output=paste0(name,".tex"))
But in the document example.Rnw, there's the function:
do.call(cbind,mget(as.character(rep_names)))
Where rep_names it's the name of some dataframes created by a loop, which i want to merge. The thing is i don't know the extact number of dataframes created.
If i compile the document directly from knitr works perfectly, but when i execute from .R file, he didn't find the objects of rep_names. Example on .pdf output.
## Error: value for ’Object_1’ not found
Where Object_1 is rep_names[1]. The problem is on which session are the object created?