I am trying to plot the following variables:
> df1$var1
[1] "2012Q1" "2012Q2" "2012Q3" "2012Q4" "2013Q1" "2013Q2" "2013Q3" "2013Q4" "2014Q1" "2014Q2"
[11] "2014Q3" "2014Q4" "2015Q1" "2015Q2" "2015Q3" "2015Q4" "2016Q1" "2016Q2" "2016Q3" "2016Q4"
[21] "2017Q1" "2017Q2" "2017Q3" "2017Q4" "2018Q1" "2018Q2" "2018Q3" "2018Q4" "2019Q1" "2019Q2"
> df1$var2
[1] NA NA NA NA 444618.3 1556125.2 744145.1 844862.2 773188.2
[10] 1204732.2 1832308.2 1732186.6 1475089.7 1238791.2 772359.0 927111.5 982978.9 581415.1
[19] 489457.8 446419.0 403841.0 654630.9 753729.4 513755.0 587031.5 465808.7 462710.4
[28] 537923.9 409037.8 785118.7
using the following code:
plot(df1$var1,df1$var2,type="l",col="red")
which gives me the following error:
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf
how can I make it work?