KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I wonder how I can make use of an already existing date field when creating a ts in R. Sometimes you simply have a date before you have a ts object, e.g. x <- as.Date("2008-01-01") + c(30,60,90,120,150) # add some data to it df = data.frame(datefield=x,test=1:length(x)) Now, is there a way to use the datefield of the df to as an index when creating a ts object? Because: ts(df$test,start=c(2008,1,2),frequency=12) (obviuously) completely ignores the date information I already have. Making use of ts methods like acf is the reason why I´d like to make it a ts object. I typcically use monthly an quarterly time series...
Tags (comma-separated)
Save Edits
Cancel