search for: final_dat

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

2008 Oct 20
2
convert matrix to dataframe with repeating row names
Hi R, I have a matrix x with repeating row names. > dim(x) [1] 862 19 zz<-matrix(0,4,4) rownames(zz)=c("a","a","b","b") data.frame(zz) (?) I need to use x in a linear regression lm(as.formula(paste("final_dat[,5]~",paste(colnames(x),collapse="+"))),x ) this gives me a error Error in model.frame.default(formula = as.formula(paste("final_dat[,5]~", : 'data' must be a data.frame, not a matrix or an array > sessionInfo() R version 2.7.1 (2008-06-23) i3...