Given a vector of values, how would you convert it into a time series object?
Answer Posted / Smita Singh
"To convert a vector of values into a time series object in R, use the ts() function. This function assumes that the data is evenly spaced and regular.nnExample:n```Rntime <- c(1:10)ndata <- c(2, 4, 6, 8, 10, 12, 14, 16, 18, 20)nmy_ts <- ts(data, start = c(2000, 1), frequency = 12)n```
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers