Hi: I want to calculate how much the values in a binary matrix varies, and for that I apply the sd() method.
mat <- matrix(c(1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1), nrow=4, ncol=3) stddev <- sd(dist(mat, method="binary")) And i get the following answer: stddev [1] 0.3442652 Is this correct? Or there is a better way out? Bests: John ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.