0

I have some files saved from a different computer using save() whereby several objects were stored in RDA file.

However, the new computer doesn't have space for all the files so I want to just load my main file. How can I load only that file from the session?

library(dplyr)

iris <- iris
cars <- cars

save(list = c("iris", "cars"), file = "myData.Rdata")

Attempt to load:

load(file="myData.Rdata", object = "cars")

I have tried using the lazyLoad() DB method suggested but get an error about the file is still too big to load at the creation of the db.

Reeza
  • 20,510
  • 4
  • 21
  • 38
  • Generates an error - DB is too big to load, 14.5GB. – Reeza Feb 09 '21 at 23:07
  • 1
    [There's a solution here](https://stackoverflow.com/questions/8700619/get-specific-object-from-rdata-file) but it seems the issue is insufficient memory in your new computer. Perhaps there is a way to manipulate RData files on disk, but I don't know it. – neilfws Feb 09 '21 at 23:12
  • If you have access to the old system, load the file there and then save the data sets to separate files. I do not see that `load` has any argument called `object=` (`args(load)`). – dcarlson Feb 09 '21 at 23:56
  • @dcarlson thanks, unfortunately not an option. I'm not aware of an object argument but it's sort of what I'd expect, I'm surprised it's so difficult for something so simple.... – Reeza Feb 10 '21 at 04:31

0 Answers0