Introduction
New R / R Studio users sometimes wonder what happens to graphs that are created in a single session. In this blog, we’ll show you the plots box in R Studio.
Interface
In R Studio, this is where you can find plots:
Right now, there aren’t any plots. Let’s create two and show you how to toggle between them.
Create Plots
Install ggplot if you have not already done so, and load ggplot2:
install.packages("ggplot")
library(ggplot2)
Now let’s try the following code:
boxplot.wool<-ggplot(warpbreaks, aes(x=wool, y=breaks)) + geom_boxplot(col="firebrick")
boxplot.wool
boxplot.tension<-ggplot(warpbreaks, aes(x=tension, y=breaks)) + geom_boxplot(col="firebrick")
boxplot.tension
Now look at your RStudio interface. The most recent plot you created is featured. However, if you click the back arrow, which we have highlighted, you will be able to go back to older plots created in the same session:
If you click on the back arrow, notice that your first plot, boxplot.wool, is featured in the plots area:
BridgeText can help you with all of your statistical analysis needs.