Reputation: 33
I followed your advice about creating a loop that loads files in R and did:
dataFiles<-lapply(Sys.glob("kwo*.rda*"), load)
Now I have my dataFiles which contains the files I wanted to load
head(dataFiles)
[[1]]
[1] "kw"
[[2]]
[1] "kw"
[[3]]
[1] "kw"
Now I need to work with the information contained in the files I loaded, what should I do to open the files and to 'identify' them?
Upvotes: 1
Views: 1572
Reputation: 60984
Standard behavior of load in this kind of loop is to create a temporary environment, load the data into it, and discarding this temporary enviroment again. If you want them in the global environment, you need to explicitly load them into the global environment, see this SO post for more info. This will load all the objects contained in all the .Rda
files into your global environment, aka workspace.
Could you provide some more information as to what you are doing exactly? What generated the Rda files, and what do you want to do with that data you read in? More information can help us, help you. And you refer to an earlier SO question your (I followed your advice about creating a loop that loads files in R), I cannot find this question in your profile.
Upvotes: 1