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

Re: [R] Summary Statistics Help

2012-04-08 Thread bobo
I've got this solved via Talks Stat mod.1<-lm(Patents~FHouse, data=datpat) summary(mod.1) anova(mod.1) xtable(mod.1) -- View this message in context: http://r.789695.n4.nabble.com/Summary-Statistics-Help-tp4541923p4542103.html Sent from the R help mailing list archive at Nabble.com. _

[R] Summary Statistics Help

2012-04-08 Thread bobo
Hi, I would really appreciate all the help I can get. Unfortunately, I am really new to statistics! I hope you guys don't mind this. I am trying to find significance levels, beta, R, R squared, adjusted R squared, standard error and t test. FILE http://r.789695.n4.nabble.com/file/n4541923/datpat

Re: [R] summary statistics for grouped data

2010-02-12 Thread William Revelle
] På vegne af jose romero [jlauren...@yahoo.com] Sendt: 12. februar 2010 18:23 Til: r-help@r-project.org Emne: [R] summary statistics for grouped data Hello list: Is there an easy way (preferably through one of the standard R packages) of obtaining summary statistics for grouped data? I could

Re: [R] summary statistics for grouped data

2010-02-12 Thread Søren Højsgaard
: [R] summary statistics for grouped data Hello list: Is there an easy way (preferably through one of the standard R packages) of obtaining summary statistics for grouped data? I could split the data into classes by hist, and then progressively calculate all the "columns" i need to obtai

Re: [R] summary statistics for grouped data

2010-02-12 Thread Greg Snow
; From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of jose romero > Sent: Friday, February 12, 2010 10:24 AM > To: r-help@r-project.org > Subject: [R] summary statistics for grouped data > > Hello list: > > Is there an easy way (preferably

[R] summary statistics for grouped data

2010-02-12 Thread jose romero
Hello list: Is there an easy way (preferably through one of the standard R packages) of obtaining summary statistics for grouped data? I could split the data into classes by hist, and then progressively calculate all the "columns" i need to obtain the mean and standard deviation, but i was look

Re: [R] summary statistics

2009-02-11 Thread phoebe kong
Thanks a bunch! They all are helpful :) On 2/10/09, Jim Lemon wrote: > William Revelle wrote: >> At 6:41 PM -0500 2/9/09, David Winsemius wrote: >>> describe() in Hmisc provides much of the rest of what you asked for: >>> describe(pref900$TCHDL) >>> pref900$TCHDL >>> n missing unique

Re: [R] summary statistics

2009-02-10 Thread Jim Lemon
William Revelle wrote: At 6:41 PM -0500 2/9/09, David Winsemius wrote: describe() in Hmisc provides much of the rest of what you asked for: describe(pref900$TCHDL) pref900$TCHDL n missing uniqueMean .05 .10 .25 .50 .75 .90 .95 9061904469 16051 4.1

Re: [R] summary statistics

2009-02-09 Thread William Revelle
At 6:41 PM -0500 2/9/09, David Winsemius wrote: describe() in Hmisc provides much of the rest of what you asked for: describe(pref900$TCHDL) pref900$TCHDL n missing uniqueMean .05 .10 .25 .50 .75 .90 .95 9061904469 16051 4.123 2.320 2.557 3.0

Re: [R] summary statistics

2009-02-09 Thread milton ruser
Just to play a little: mystats<- function(x) { xvalid<-x[!is.na(x)] XNtotal<-length(x) XNnull<-length(xvalid) XNnotNull<-XNtotal-XNnull Xmean<-mean(xvalid) Xmedian<-median(xvalid) Xsd<-sd(xvalid) Xrange<-range(xvalid) my.results<-cbind(XNtotal, XNnull, XNnotNull, Xmean, Xmedian, Xsd, Xmin=Xrange[1

Re: [R] summary statistics

2009-02-09 Thread Jorge Ivan Velez
Dear SY, Also take a look at basicStats in the fBasics package. # fBasics package install.packages('fBasics') require(fBasics) # For reproducibility set.seed(123) # Some data x<-c(NA,rnorm(10),NA) basicStats(x) HTH, Jorge On Mon, Feb 9, 2009 at 6:04 PM, phoebe kong wrote: > Hi all, > > I

Re: [R] summary statistics

2009-02-09 Thread David Winsemius
describe() in Hmisc provides much of the rest of what you asked for: > describe(pref900$TCHDL) pref900$TCHDL n missing uniqueMean .05 .10 .25 .50 . 75 .90 .95 9061904469 16051 4.123 2.320 2.557 3.061 3.841 4.886 6.054 6.867 lowest

[R] summary statistics

2009-02-09 Thread phoebe kong
Hi all, I'm wondering if there is a function that can return summary statistics: N=total number of observation, # missing, mean, median, range, standard deviation. As I know, summary() returns some of info I've mentioned above. Thanks, SY [[alternative HTML version deleted]] __

Re: [R] summary statistics into table/data base, many factors to analyse

2008-11-22 Thread Gabor Grothendieck
On Fri, Nov 21, 2008 at 5:50 AM, Gerit Offermann <[EMAIL PROTECTED]> wrote: > Dear list, > > thanks to your help I managed to find means of analysing my data. > > However, the whole data set contains 264 variables. Of which some are > factors, others are not. The factors tend to be grouped, e.g. >

Re: [R] summary statistics into table/data base, many factors to analyse

2008-11-21 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 21.11.2008 11:50:52: > Dear list, > > thanks to your help I managed to find means of analysing my data. > > However, the whole data set contains 264 variables. Of which some are > factors, others are not. The factors tend to be grouped, e.g. > data$f1304 to data

Re: [R] summary statistics into table/data base, many factors to analyse

2008-11-21 Thread Gerit Offermann
Dear list, thanks to your help I managed to find means of analysing my data. However, the whole data set contains 264 variables. Of which some are factors, others are not. The factors tend to be grouped, e.g. data$f1304 to data$f1484 and data$f3204 to data$5408. But there are other types of va

Re: [R] summary statistics into table/data base, many factors to analyse

2008-11-20 Thread Jorge Ivan Velez
Dear Gerit, Here is a start using a data set which first column is numeric and the rest are factors 'f1', 'f2',,'f1381' (I'm using only 3): # Data set x <- c(1,4,2,6,8,3,4,2,4,5,1,3) y <- as.factor(c(2,2,1,1,1,2,2,1,1,2,1,2)) z <- as.factor(c(1,2,2,1,1,2,2,3,3,3,3,3)) mydata=data.frame(x,y,z)

Re: [R] summary statistics into table/data base, many factors to analyse

2008-11-20 Thread Gabor Grothendieck
Look at summaryBy in the doBy package. On Thu, Nov 20, 2008 at 9:16 AM, Gerit Offermann <[EMAIL PROTECTED]> wrote: > Dear list, > > I reduced my data to the following: > > x <- c(1,4,2,6,8,3,4,2,4,5,1,3) > y <- as.factor(c(2,2,1,1,1,2,2,1,1,2,1,2)) > z <- as.factor(c(1,2,2,1,1,2,2,3,3,3,3,3)) > >

[R] summary statistics into table/data base, many factors to analyse

2008-11-20 Thread Gerit Offermann
Dear list, I reduced my data to the following: x <- c(1,4,2,6,8,3,4,2,4,5,1,3) y <- as.factor(c(2,2,1,1,1,2,2,1,1,2,1,2)) z <- as.factor(c(1,2,2,1,1,2,2,3,3,3,3,3)) I can produce the statistical summary just fine. s1 <- tapply(x, y, summary) d1 <- tapply(x, y, sd) s2 <- tapply(x, z, summary) d2

Re: [R] Summary statistics across factor levels

2008-04-30 Thread Henrique Dallazuanna
Try this: sek <- seq(1, nrow(Indometh), 9) Indometh$time[sek] <- NA Indometh$timeclass <- factor(cut(Indometh$time, breaks=c(0,2,4,6,8,10))) x <- summary(conc ~ Subject + timeclass, method="cross", data=Indometh) vec <- x$S dim(vec) <- attr(x, "out.attrs")$dim dimnames(vec) <- attr(x, "out.attrs")

Re: [R] Summary statistics across factor levels

2008-04-30 Thread Frank E Harrell Jr
Lauri Nikkinen wrote: R users, I intention is to calculate some summary statistics across factor levels. I know that in Hmisc package there is a summary function which produces neat summary statistics when using "cross" option. I would like to produce similar output with N and Missing columns bu

[R] Summary statistics across factor levels

2008-04-30 Thread Lauri Nikkinen
R users, I intention is to calculate some summary statistics across factor levels. I know that in Hmisc package there is a summary function which produces neat summary statistics when using "cross" option. I would like to produce similar output with N and Missing columns but produce a data.frame.

Re: [R] summary statistics

2008-02-13 Thread Petr PIKAL
Hi one of the good starting points is Paul Johnsons StatsRus (the first hit in Google and I believe it is in Rwiki too). It helped me when I started with R about 10 years ago. For me usually the best way to arrange data is in "database form". It means each column is a variable (numerical, cate

Re: [R] summary statistics

2008-02-13 Thread stephen sefick
Jim, prettyR looks like it will work, but with the way that my data frame is set up I still can not get what I want out of it. I am lacking in my knowledge on manipulating data frames, and general R programing. Is there a reference that will give me all of these wonderful data manipulation tools t

Re: [R] summary statistics

2008-02-13 Thread Jim Lemon
stephen sefick wrote: > below is my data frame. I would like to compute summary statistics > for mgl for each river mile (mean, median, mode). My apologies in > advance- I would like to get something like the SAS print out of PROC > Univariate. I have performed an ANOVA and a tukey LSD and I wo

Re: [R] summary statistics

2008-02-12 Thread Henrique Dallazuanna
Mode <- function(var)rownames(table(var))[which.max(table(var))] as.data.frame(sapply(c("mean", "median", "Mode"), function(fun)tapply(x$mgl, x$RM, fun, na.rm=T))) On 12/02/2008, stephen sefick <[EMAIL PROTECTED]> wrote: > below is my data frame. I would like to compute summary statistics > for

Re: [R] summary statistics

2008-02-12 Thread Jorge Iván Vélez
Hi Stephen, Try tapply(DATA$mgl,DATA$RM,summary) # DATA is a data.frame I hope this helps. Jorge On 2/12/08, stephen sefick <[EMAIL PROTECTED]> wrote: > > below is my data frame. I would like to compute summary statistics > for mgl for each river mile (mean, median, mode). My apologies in

Re: [R] summary statistics

2008-02-12 Thread jim holtman
Here is one way of doing it: (no exactly sure if 'mode' makes sense with your data) > x <- read.table(textConnection("RM mgl + 1 215 0.9285714 + 2 215 0.7352941 + 3 215 1.6455696 + 4 215 0.600 + 5 sc 1.833 + 6 sc 0.833 + 7 sc 2.5438596 + 8 sc 0.250 + 9 202

[R] summary statistics

2008-02-12 Thread stephen sefick
below is my data frame. I would like to compute summary statistics for mgl for each river mile (mean, median, mode). My apologies in advance- I would like to get something like the SAS print out of PROC Univariate. I have performed an ANOVA and a tukey LSD and I would just like the summary stat