Storage of an arbitrary object R on the HDD?

I understand that we can export data matrices to csvor files xlsx.

What about complex objects like lm? For example, in my work, I may have a list of length 1000, each with one object lm(). Every time I load R, I have to wait a long time to populate a list of length 1000 with these objects lmusing the foror loop lapply.

I would rather just save the list somewhere on my hard drive at the end of the session and open it at the beginning of the next session.

+5
source share
1 answer

Yes, use save()with your copy load().

, "" (. help(serialize)), R .

+7

All Articles