35

I created a database "mydb" that when run with lazyLoad("mydb") import in the workspace the (big) data.frames X and Y. I created "mydb" putting X and Y in an environment e and using the command tools:::makeLazyLoadDB(e,"mydb")

Now I created a third data.frame Z (quite big as well).

How can I add it to "mydb" without having to recreate the lazy objects for X and Y as well?

Mousey
  • 1,793
  • 15
  • 34
lucacerone
  • 8,140
  • 12
  • 48
  • 72
  • Possibly relevant? http://stackoverflow.com/questions/14757668/combine-multiple-rdata-files-containing-objects-with-the-same-name-into-one-sin – C8H10N4O2 May 20 '15 at 17:03

1 Answers1

4

You need to save your workspace and try adding Dataframe Z into environment and again run tools:::makeLazyLoadDB(e,"mydb") , please find example below

e=new.env(parent=emptyenv());
e$x=10;
e$y=20;
tools:::makeLazyLoadDB(e,"mydb");
save.image();
lazyLoad("mydb");
e$z=40;
tools:::makeLazyLoadDB(e,"mydb");
save.image();
lazyLoad("mydb");

You can see your three Data frames x,y,z.