[R] Break into Parts

Gabor Grothendieck ggrothendieck at gmail.com
Fri Apr 28 14:23:36 CEST 2006


Try this:

tapply(x, cut(x, 12), sd)


On 4/28/06, sumanta basak <basaksumanta at yahoo.com> wrote:
> Hi R-Experts,
>
> I have a vector of length 72. I want to break it into 12 parts and want to take standerd deviation of each group. Please help me in this regard.
>
> Thanks,
> Sumanta.
>
>
> ---------------------------------
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list