Hi I have several RData files with the same file name and object name. For example one of the file names is int.5.RData where the dataframe int.5 is saved. I have several similar files with names int.5.RData, int.10.RData, and so on. Now I have to load them and assign a same variable name (say new.int) to the data frames( int.5, int.10, etc) in a for loop. I can load them by using load(paste0("int",i,".RData")) in the for loop where i is c(5,10,...), But I am stuck with the next step where I have to assign the data frames (int.5, int.10,etc) the same name, int.new in the same loop as I can't use pastecommand for that operation. Can anybody help me here?
-
1Better to read the data into a list. See gregor's answer here.lmo– lmo2017-07-06 12:10:45 +00:00Commented Jul 6, 2017 at 12:10
-
can you post what you've done already in full in addition to describing it?pr140– pr1402017-07-06 12:42:23 +00:00Commented Jul 6, 2017 at 12:42
Add a comment
|