I created a time series in R Studio, where I try to analyse the CO2 emissions of the United States. I created a time series of the CO2 emissions and plotted it, which worked very well.
After that I tried to apply the acf()
and pacf()
functions, but R is saying that there is a mistake bec. "x has to be numeric". I don't unterstand why bec. I just have numeric values in my time series data set.
CHemission <- ts(dfCH$Emission, start = 1960, frequency = 1) #create a time series of the emission
plot(CHemission) # plot it
acf(CHemission) # apply acf, which unfortunately does not work.
Thank you much in advance for any help!!!