I am fairly new to R, so I'm sorry if this is an obvious or basic question. I am trying to create a scatterplot of salinity over the course of one year. I executed this code line by line, but when I run ggplot, the only thing that appears in the Plots pane is a grey rectangle where the plot would usually be. I am currently using the latest update of RStudio.
I have already restarted RStudio and used dev.off(). I'm not sure what's going on.
'''
##Reset R's brain
rm(list=ls())
#set working directory
setwd("C:/Users/jelli/OneDrive/Documents/Rprojects/Thesis")
getwd()
#----------------------------------------------------------------------##
#set up data
thesisdata <- read.csv("Jo_TidalCreeks_practice.csv")
ls()
thesisdate <- as.Date(thesisdata$date, format = "%m/%d/%Y")
#------------------------------------------
#GGPLOT TRIAL
#-------------------------------------------
p <- ggplot(aes(thesisdate, thesisdata$salinity, color=thesisdata$stream_location) +
geom_point() +
facet_grid(rows = vars(thesisdata$water_system), cols = vars(thesisdata$session),
scales = "free") +
theme_classic())
print(p)
'''