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