[R] Summary Stats (not summary(x))

nmarti nate318i at yahoo.com
Thu Jul 10 02:53:29 CEST 2008


Thanks Gabor.
I was able to create a function that works really well.  One more quick
question if you don't mind.
I want to report the number of observations also (i.e. n = 5420).  What
function would do this?  I really can't find anything that would just simply
count the number of x's.
Thanks again.


Gabor Csardi wrote:
> 
> Why don't you write it for yourself, it takes less time than writing 
> an email:
> 
> mysummary <- function(x) { 
>  require(plotrix)
>  require(e1071)
>  c(Mean=mean(x), Std.Error=std.error(x), Std.Deviation=sd(x), 
>    Kurtosis=kurtosis(x))
> }
> 
> Gabor
> 
> On Wed, Jul 09, 2008 at 08:15:00AM -0700, nmarti wrote:
>> 
>> I'm looking for a function that lists a few summary stats for a column
>> (or
>> row) of data.  I'm aware of summary(x), but that does not give me what
>> I'm
>> looking for.
>> I'm actually looking for something that is very similar to the
>> descriptive
>> statistics tool in excel; i.e. Mean, Std. Error, Std. Deviation,
>> Kurtosis.
>> I'm positive that I came across a function that did this (possibly in
>> Rmetrics), but now I can't find it.  I lost it in the endless mass of R
>> functions.
>> 
>> Any help would be appreciated.
>> -- 
>> View this message in context:
>> http://www.nabble.com/Summary-Stats-%28not-summary%28x%29%29-tp18363275p18363275.html
>> Sent from the R help mailing list archive at Nabble.com.
>> 
>> ______________________________________________
>> R-help at 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.
> 
> -- 
> Csardi Gabor <csardi at rmki.kfki.hu>    UNIL DGM
> 
> ______________________________________________
> R-help at 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Summary-Stats-%28not-summary%28x%29%29-tp18363275p18373862.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list