On Mar 19, 2011, at 12:13 PM, Nathan Torrance wrote:
Is it in bad form to double post to StackOverflow and R-help?
Apologies if
so. Here's my task:
I've got a matrix of means like so
means<-matrix(1:10,nrow=2)
colnames(means)<-c("a","b","c","d","e")
and a matrix of standard deviations like
Hi Nathan,
Do not know a direct way, but the following seems to work:
# data
means <- matrix(1:10,nrow=2)
sds <- matrix(seq(0.1,1,by=0.1),nrow=2)
colnames(means) <- colnames(sds) <- c("a","b","c","d","e")
# adding "( )" to the SDs
sdsn <- t(apply(sds, 1, function(x) paste('(', x, ')', sep = ""))
Is it in bad form to double post to StackOverflow and R-help? Apologies if
so. Here's my task:
I've got a matrix of means like so
means<-matrix(1:10,nrow=2)
colnames(means)<-c("a","b","c","d","e")
and a matrix of standard deviations like so
sds<-matrix(seq(0.1,1,by=0.1),nrow=2)
colnames(sds)<-c
3 matches
Mail list logo