search for: morphtrait

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

2011 Sep 19
1
regression summary results pvalues and coefficients into a excel
...data <- read.table("gene.csv", row.names=1, sep=',') 2) headshape <- c(0.575818, 0.573874, 0.525701, 0.548490, 0.685111, 0.592502, 0.566001, 0.563605, 0.637906, 0.578099, 0.588142, 0.383393, 0.561732, 0.456134, 0.430472, 0.603143, 0.514315, 0.53328, 0.482734, 0.637906) 3) morphtrait <- headshape aof<-function(x){m<-data.frame(morphtrait,x); summary(lm(morphtrait~x, m))} 4) regressionresults <-apply(sdata, 1, aof) 5) regpvalues <- data.frame(lapply(regressionresults, function(x){x["Pr(>|t|)"][1:2,]})) 6) write.table(t(regpvalues), file = "reg...