I'm not sure if I missed it explained elsewhere but I need some help changing the month number (ex. 1, 2, 3) to month name (ex. January, February, March).
Currently, the graph prints the number of the month on the x-axis and I would like for it to show the name of the month.
I did try a few items but kept getting null in the column.
Below is my current code:
install.packages("Stat2Data")
library(Stat2Data)
data("CO2Hawaii")
select(CO2Hawaii)
hawaiiGraph <-
ggplot(
data = CO2Hawaii,
aes(
x = Month,
y = CO2)
) +
geom_line(
aes(group = Year)
) +
theme(axis.text.x = element_text(angle = 55, hjust = 1)
) +
ggtitle("CO2 Levels in Hawaii Over Time")
hawaiiGraph
I really appreciate any help.
