Displaying 1 result from an estimated 1 matches for "nofactor".
Did you mean:
cofactor
2012 Mar 15
1
Accessing variable's name as an attribute?
...a=sfa)
The dataset has a large number of VARIABLES of interest so I want to make use of loops where possible to build groupedData objects from each of the relevant columns along the lines of:
sfa <- na.omit(read.csv("SFAFinalData.csv", header = TRUE))
factorsList <- colnames(sfa)
noFactors <- length(factorsList)
for (i in seq(4,noFactors)) {
columnName <- factorsList[i]
dataset <- groupedData(sfa[,columnName] ~ TIME|ID, data=sfa, labels = list("Weeks post injury", columnName))
}
Of course at present this simply results in sequential overwriting of dataset w...