I am trying to read in yearly data with gaps using the read.zoo
function from the zoo
package. I am having some trouble finding the FUN
that declares the data to be yearly data. The data set is located here.
The function call I am trying is
tsGDP <- read.zoo("us-gross-domestic-product-192919.csv", sep=",", format="%Y",
regular=FALSE, header=TRUE, index.column=1)
plot(log(tsGDP))
This works fine, but it chokes when I try to plot the ACF of the series
> acf(tsGDP)
Error in na.fail.default(as.ts(x)) : missing values in object
This R-list posting seems to indicate that this is because I am not declaring yearly data correctly.