Which one is the best? Rstudio cloud or installed Rstudio in a laptop

Hi there...

I was doing a project on my laptop in Rstudio.

I was writing code on the console pane. Somehow I started doing this from day 1. So as I progressed down (scrolling down) with writing code in the console pane I started to experience weird things happening. The code that I wrote like half an hour ago started disappearing I don't see any anymore.

Can someone tell me what wrong I did here?

Moreover, I don't know how to bring the code back. Does R has any options like checking history? and saving option for all code we write in R.

Additionally, please share your pros and cons (I mean your experience with RStudio)of using the Rstudio cloud and installed Rstudio.

Thank you.

The console pane is not meant to store code for long, it'll only remember a number of lines. In RStudio, you can look for the "History" pane, that should store a longer list of recent commands (but not the output). It also gets saved in the file .Rhistory by default. Even this history will have a limit on how many lines it saves.

In any case, relying on the history is a bad idea, not only is it easy to lose, it's also context-dependent (running the same command might give a different result if you changed the data in the meantime). You should write all your code in the editor pane, you can run it with ctrl+Enter (or cmd+enter on Mac), and at the end you have a script file that you can save on your computer, and you can always restart it from the beginning to have a reproducible analysis.

Depends, the cloud has limits on memory available depending on how much you pay, the desktop version has limits depending on your laptop's memory. I would also expect things to be a bit faster and smoother on the desktop version, but again depends on your laptop.

Hi there...

Thank you for the valuable inputs.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.