Multi groups line chart with ggplot2 for agregated data

Hello,

I need to plot a multi groups line with ggplot2 using agregated data. This is all I have:
time : num [1:6] 2016 2017 2018 2019 2020 ... quits: num [1:6] 0 -7.5 -21.7 22.5 30 ...
open : num [1:6] 0 -3.33 -31.67 42.5 18.33 ... hires: num [1:6] 0 -6.67 -20.83 19.17 59.17 ...

I have to plot job openings (open), quits and hires over time (from 2016 to 2021) in one graph.

When I run the following codes
geom_line(data = hc, mapping = aes(x=time, y=quits), color="black")
geom_line(data = hc, mapping = aes(x=Time, y=open), color="blue")

I gett this message:

geom_line(data = hc, mapping = aes(x=time, y=quits), color="black")
mapping: x = ~time, y = ~quits
geom_line: na.rm = FALSE, orientation = NA
stat_identity: na.rm = FALSE
position_identity
geom_line(data = hc, mapping = aes(x=Time, y=open), color="blue")
mapping: x = ~Time, y = ~open
geom_line: na.rm = FALSE, orientation = NA
stat_identity: na.rm = FALSE
position_identity

And no graph pops up -

Sorry if this is very basic but I am very new to R

Any help is really appreciated,

Best,
C

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.