Entering edit mode
5.2 years ago
Shaurya Jauhari
▴
50
Hi everyone.
I have the following line of code where R rejects the expression on the left to be treated as an assignee variable.
for (i in 1:length(my_list)){
paste(eval(parse(text='names(my_list[i])')),"table",sep="") <- read.table(paste("./foo/",paste(eval(parse(text='names(my_list[i])')),".csv",sep=""),sep=""))
}
Any comments you would like to make here.
Thanks. SJ.
Edit:
Just to add, the exception reported is:
Error in paste(eval(parse(text = "names(my_list[i])")), "table", sep = "") <- read.table(paste("./foo/", :
target of assignment expands to non-language object