I'm new to R and have been practicing cleaning data and using ggplot2 for visualizations. I had a number of ggplots written that were working fine, until I started messing around with the theme function. Then suddenly all of my plots stopped working and I keep getting the following error message: Error in grid.newpage() : LENGTH or similar applied to closure object. I deleted the plot that started the issue but now it's affecting all plots. Below are the last few plots I was working on.
ggplot(data=intensity_per_hour) + geom_col(mapping=aes(x=Time, y=total_intensity))+ theme(axis.text.x = element_text(angle = 60, vjust = 1, hjust=1)) + ylab("Summed total intensity") + labs(title="Total intensity level for all participants over course of day", subtitle = "Aggregate of the total intensity for each participant")
ggplot(data=one_day_intensity) + geom_jitter(mapping=aes(x=Time, y=total_intensity, color=Time)) + theme(axis.text.x = element_text(angle = 60, vjust = 1, hjust=1)) + ylab("total intensity") + labs(title="Intensity level over course of day")
ggplot(data=sleep_clean) + geom_point(mapping=aes(x=total_time_in_bed, y=total_minutes_asleep)) + labs(title="Time in bed vs. Time asleep") + theme(legend.title = element_text(color=id))