Can we save our process if we don't save a project?
If I don't save a project while running a whole script, can I save my results instead of starting it all over again after restart my computer? R seems to have no memory.
Yes, you can save either your whole environment or specific objects as .RDS files. RDS files contain one or more R objects. This is very helpful, if you only wish to save intermediate results. For saving RDS objects use saveRDS(). For reloading them use readRDS(). The exact use can be found in the widely available discussions and documentations online. I use it to store large tables that that if read directly from csv-format would take longer to load. Another use for me is storing prediction models that take hours to train.
There are many ways to save results as an R script runs, take a look at the R saveRDS function as one example.
For questions like this about R a great place to go is community.rstudio.com.
Posit was founded with the mission to create open-source software for data science, scientific research, and technical communication. We don’t just say this: it’s fundamentally baked into our corporat
With over 2.5 million reviews, we can provide the specific details that help you make an informed software buying decision for your business. Finding the right product is important, let us help.
or continue with
LinkedIn
Google
Google (Business)
Gmail.com addresses not permitted. A business domain using Google is allowed.