3rd year uni student here, I have an econometry project to hand back on the 15th; we have to work with Rmd but I'm not really familiar with the tool... so any help would be much appreciated! My problem here is that I want to display on a ggplot the evolution of GDP in Belgium throughout the years. Here's what my data looks like (you can see the Time column is organized with quarters [![Data to work with][1]][1]. I coded this:
ggplot(data = PIB, aes(x=PIB$Time, y=PIB$Belgium, group=1)) geom_line() labs(x="Time", y="Belgian PIB")
and here's the ouput I have:
[![ggplot evolution graph][2]][2]
I'm very satisfied with how the graph looks except for the X-axis. I looked online on many platforms but I can't for the life of me figure out how to organize the Time axis. The format of the column really throws me off.. I'd like for online 4/5 timestamps to be shown, so the reader can understand that the evolution goes from 2001 to 2021 and that the GDP changes every quarter.
I'm aware this is probably a stupid question but any help would be welcome! [1]:
Note
PIB <-
structure(list(Time = c("2001Q1", "2001Q2", "2001Q3", "2001Q4",
"2002Q1", "2002Q2", "2002Q3", "2002Q4"), Belgium = 1:8),
class = "data.frame", row.names = c(NA, -8L))