If R is the engine and bare bones of your car, then RStudio is like the rest of the car. The engine is super critical part of your car. But in order to make things properly functional, you need to have a steering wheel, comfy seats, a radio, rear and side view mirrors, storage, and seatbelts.
The RStudio layout has the following features:
We saw a bit of what an rmarkdown script does.
The R console is the bit where you can run your code. This is where the R code in your rmarkdown document gets sent to run.
The file/plot/pkg viewer is a handy browser for your current files, like finder, or file explorer, plots are where your plots appear, you can view packages, see the help files. And the environment / history pain contains the list of things you have created, and the past commands that you have run.
To first get set up, I highly recommend changing the following setting
Tools > Global Options (Or Cmd + ,
)
Under the General tab:
This means that you won’t save the objects and other things that you create in your R session and reload them. This is important for two reasons
Your “history” is the commands that you have entered into R.
Additionally, not saving your history means that you won’t be relying on things that you typed in the last session, which is a good habit to get into!