Error with aes() in ggplot2

Hi!
I'm trying to plot a timeseries data using ggplot2. However, when I'm using ggplot (as shown below), I'm getting this error: "Error: Mapping should be created with aes() or aes_()". Please help me solve this.

Thank you!

sp <- ggplot(data = data_19, mapping = aes(x = rdate) + geom_line(mapping = aes(y=State_name, color = "red"), size = 1.5))

You are missing a second closing bracket after rdate

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.