search for: ogcol

Displaying 1 result from an estimated 1 matches for "ogcol".

Did you mean: gcol
2012 Jul 31
2
Creation of a vector of time series from a data frame
...er of R. I am trying to create a vector of time series called "LTot" from a data frame. The purpose is to call LTot element from a loop to make multiple regressions over a large number of regressors. Here a piece of R code OGData <- read.table("heartatk4R.txt", header=TRUE) OGCol <- ncol(OGData) OGRow <- nrow(OGData) S1.ts=ts(OGData[,1]) # Definition of the time series vector LTot=matrix(,nrow=OGCol) # assignment of each column of the data frame to an element of the time series vector for (i in 1:OGCol) {LTot[1:OGRow,i] <- ts(OGData[,i]);} When I run R, I got th...