[R] descriptive statistics

David Hajage dhajage.r at gmail.com
Mon Dec 13 11:48:30 CET 2010


Another way is the remix function of the remix package.

On Monday, December 13, 2010, justin bem <justin_bem at yahoo.fr> wrote:
> A nice way to obtain summary for data is to use summary.formula in Hmisc
> package.
>
>  Justin BEM
> BP 1917 Yaoundé
> Tél (237) 76043774
>
>
>
>
> ________________________________
> De : Jim Lemon <jim at bitwrit.com.au>
> À : effeesse <scarpino86 at gmail.com>
> Cc : r-help at r-project.org
> Envoyé le : Lun 13 décembre 2010, 11h 23min 15s
> Objet : Re: [R] descriptive statistics
>
> On 12/13/2010 09:04 PM, effeesse wrote:
>>
>> Hi. In a data set I have a variable that takes values from 1 to 14. For each
>> subgroup of values of this variable, I would like to obtain some descriptive
>> statistics of other variables present in the data set. I've been trying with
>> a "for" loop but I couldn't get nothing. Could you please suggest me some
>> lines?
>
> Hi effeesse,
> Sure:
>
> testmat<-data.frame(sample(1:14,50,TRUE),rnorm(50),runif(50))
> by(testmat[,-1],testmat[,1],mean)
>
> Jim
>
> ______________________________________________
> 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.
>
>
>
>
>         [[alternative HTML version deleted]]
>
>



More information about the R-help mailing list