Plotting mutated data

Hi!

I've trying to plot data that has been mutated into quarterly growth rates from nominal levels.

i.e the original dataset was

Date GDP Level
2010Q1 457
2010Q2 487
2010Q3 538
2010Q4 589
2011Q1 627
2011Q2 672.2
2011Q3 716.4
2011Q4 760.6
2012Q1 804.8
2012Q2 849
2012Q3 893.2
2012Q4 937.4

Which was in an excel file which I have imported using dataset <- read_excel("xx")

Then, I have done the below in order to mutate it to quarter on quarter growth ("QoQ Growth):

dataset %>%
mutate(QoQ Growth= (GDP Level) / lag(GDP Level, n=1) - 1)

I would like to now plot this % growth across time, however I'm not too sure how what the geom_line code is for a mutated variable, any help would be really truly appreciated! I'm quite new to R and really trying to learn, thanks!

@nirgrahamuk has a solution for you.

It would be better if you post the follow-up questions in the same thread.

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.