Re: [R] Summary statistics for matrix columns

2012-11-24 Thread David Winsemius
On Nov 24, 2012, at 4:58 AM, frespider wrote: HI A.k, I need one more question, if you can answer it please M <- matrix(sample(1:8000),nrow=100) colnames(M)<- paste("Col",1:ncol(M),sep="") apply(M,2,function(x) c(Min=min(x),"1st Qu" =quantile(x, 0.25,names=FALSE),

Re: [R] Summary statistics for matrix columns

2012-11-24 Thread arun
6   59   67   47   52   66   65   69    66 #or rowDiffs(colRanges(x)) A.K. - Original Message - From: frespider To: r-help@r-project.org Cc: Sent: Saturday, November 24, 2012 7:58 AM Subject: Re: [R] Summary statistics for matrix columns HI A.k, I need one more question, if y

Re: [R] Summary statistics for matrix columns

2012-11-24 Thread William Dunlap
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of frespider > Sent: Saturday, November 24, 2012 4:58 AM > To: r-help@r-project.org > Subject: Re: [R] Summary statistics for matrix columns > > > > HI A.k, > > I need

Re: [R] Summary statistics for matrix columns

2012-11-24 Thread frespider
ystem elapsed # 0.968 0.000 0.956 A.K. ____ From: Fares Said <[hidden email]> To: arun <[hidden email]> Cc: Pete Brecknock <[hidden email]>; R help <[hidden email]> Sent: Friday, November 23, 2012 10:23 AM Subject: R

Re: [R] Summary statistics for matrix columns

2012-11-23 Thread arun
mes(x)<- paste("Col",1:ncol(x1),sep="") system.time(fun1(x1)) #   user  system elapsed  # 0.968   0.000   0.956 A.K. ________________ From: Fares Said To: arun Cc: Pete Brecknock ; R help Sent: Friday, November 23, 2012 10:23 AM Subject: Re: [R] Summary statistics for matrix columns

Re: [R] Summary statistics for matrix columns

2012-11-23 Thread arun
Message - From: Pete Brecknock To: r-help@r-project.org Cc: Sent: Friday, November 23, 2012 8:42 AM Subject: Re: [R] Summary statistics for matrix columns frespider wrote > Hi, > > it is possible. but don't you think it will slow the code if you convert > to data.fr

Re: [R] Summary statistics for matrix columns

2012-11-23 Thread Fares Said
quot; = quantile(x,0.75,names=FALSE), > IQR=IQR(x), > Max = max(x))) }) > # user system elapsed > # 0.384 0.000 0.384 > > > A.K. > > > > ----- Original Message - > From: Pete Brecknock > To: r

Re: [R] Summary statistics for matrix columns

2012-11-23 Thread Pete Brecknock
frespider wrote > Hi, > > it is possible. but don't you think it will slow the code if you convert > to data.frame? > > Thanks > > Date: Thu, 22 Nov 2012 18:31:35 -0800 > From: > ml-node+s789695n4650500h51@.nabble > To: > frespider@ > Subject: RE: Summary statistics for matrix columns >

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
Hi, it is possible. but don't you think it will slow the code if you convert to data.frame? Thanks Date: Thu, 22 Nov 2012 18:31:35 -0800 From: ml-node+s789695n4650500...@n4.nabble.com To: frespi...@hotmail.com Subject: RE: Summary statistics for matrix columns HI, Is it possible t

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
HI, but Sd and IQR not in the order I want , Thanks Date: Thu, 22 Nov 2012 18:08:57 -0800 From: ml-node+s789695n4650496...@n4.nabble.com To: frespi...@hotmail.com Subject: RE: Summary statistics for matrix columns Hi, How about this: res<-do.call(cbind,lapply(split(x,col(x)),funct

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
There is still missing some statistics, like sd and IQR and I prefer the output to be matrix Thanks Date: Thu, 22 Nov 2012 18:00:20 -0800 From: ml-node+s789695n4650493...@n4.nabble.com To: frespi...@hotmail.com Subject: Re: Summary statistics for matrix columns HI, You could try t

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
Hi peter, but this doesn't give me them in the order I want. Is there a better approach Thanks -- View this message in context: http://r.789695.n4.nabble.com/Summary-statistics-for-matrix-columns-tp4650489p4650492.html Sent from the R help mailing list archive at Nabble.com. _

[R] Summary statistics for matrix columns

2012-11-22 Thread frespider
Hi, is there a way I can calculate a summary statistics for a columns matrix let say we have this matrix x <- matrix(sample(1:8000),nrow=100) colnames(x)<- paste("Col",1:ncol(x),sep="") if I used summary summary(x) i get the output for each column but I need the output to be in matrix with r

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
I also don't like to use split function because I have like around 800 columns Date: Thu, 22 Nov 2012 18:08:54 -0800 From: ml-node+s789695n4650496...@n4.nabble.com To: frespi...@hotmail.com Subject: RE: Summary statistics for matrix columns Hi, How about this: res<-do.call(cbind,lapply(split(

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread Pete Brecknock
frespider wrote > Hi, > > is there a way I can calculate a summary statistics for a columns matrix > let say we have this matrix > x <- matrix(sample(1:8000),nrow=100) > colnames(x)<- paste("Col",1:ncol(x),sep="") > > if I used summary > summary(x) > > i get the output for each column but I