[R] Finding non-normal distributions per row of data frame?

DB1984 dannybolg at gmail.com
Fri Feb 4 16:48:14 CET 2011


Thanks for the feedback Patrizio - but your function is performing the
shapiro.test on columns instead of rows...

I tried:
nt<-data.frame(#a dataframe with 6 columns and 9 rows)

nr <- nrow(nt)

 
test <- apply(nt, nt[1:nr,], shapiro.test)

Error in ds[-MARGIN] : invalid subscript type 'list'

fred<-data.frame(sapply(test,function(x)c(x$statistic, x$p.value)))


But picked up the error above. Do I still require a loop to apply this over
rows?


-- 
View this message in context: http://r.789695.n4.nabble.com/Finding-non-normal-distributions-per-row-of-data-frame-tp3259439p3260412.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list