Displaying 1 result from an estimated 1 matches for "firstcolno".
Did you mean:
firstcol
2012 Nov 21
0
Making part of a data frame into a time series
...I wanted to get the data in columns n and
higher to be recognized as a bunch of time series. So I wrote a function
that was supposed to turn all the columns from a given column number on into
a time series:
# Convert the final cols of a data frame into a time series
MakeTS <- function(data.df, firstColNo, firstYear, firstSubNo = NULL, freq =
1){
data.df[,firstColNo:ncol(data.df)] <- ts(data =
data.df[,firstColNo:ncol(data.df)],
start = c(firstYear, firstSubNo), frequency = freq)
data.df
}
However it does not app...