# time series problems

#### noetsi

##### No cake for spunky
I do
Code:
mydata <- read_excel(file.choose())

mydata<- ts(mydata$Spend, start = c(2017, 7), frequency = 12) and I have no trouble I do Code: mydatatr<- ts(mydata$Spend, start = c(2017, 7), end = c(2021,9), frequency = 12)
and I get
Error in mydata$Spend :$ operator is invalid for atomic vectors

It is the same data set, this makes no sense.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Does ts have source documentation to help inform you? It has been a long time since I got an atomic error, but isn't that usually an error that says the variable has to come from a single vector data source. Trying to remember if it requires a reformatting or not.

#### noetsi

##### No cake for spunky
It is an error about the formatting of the data. What does not make sense here is it gives no error for the whole data set, but gives an error when you use part of the data set. It's the same data set.