[R] Help "deleting negative values in a matrix, and do statistic analysis"

york8866 yu_york at hotmail.com
Tue May 8 20:12:26 CEST 2012


Hi, John,

the code ran well.

however, somehow, the means were not calculated correctly using the
following code.

test <- read.csv("Rtestdataset.csv", as.is=T,header=T)  
test <- data.frame(test)
test
rowMeans(test)
apply(test,1,function(y)mean(y>=0))

Is there anything wrong?
thanks,



--
View this message in context: http://r.789695.n4.nabble.com/Help-deleting-negative-values-in-a-matrix-and-do-statistic-analysis-tp4617792p4618247.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list