Re: [R] Histogram

From: Vincent Goulet <vincent.goulet_at_act.ulaval.ca>
Date: Thu, 24 Jul 2008 00:27:07 -0400

Le mer. 23 juil. à 14:29, Angelo Scozzarella a écrit :

> Hi,
>
> how can I treat data organised in classes and frequencies?
>
> Ex.
>
> class frequency
>
> 20-23 9
> 23-25 7
> 26-28 5
> 29-31 5
> 32-34 3

It depends what you mean by "treat", but package actuar has a function grouped.data() to create such objects. Then, there are methods to compute the mean or plot the histogram. See the "lossdist" package vignette for details.

HTH Vincent

--
   Vincent Goulet, Associate Professor
   École d'actuariat
   Université Laval, Québec
   Vincent.Goulet@act.ulaval.ca   http://vgoulet.act.ulaval.ca


> Thanks
>
> Angelo Scozzarella
______________________________________________ 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.
Received on Thu 24 Jul 2008 - 04:30:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Jul 2008 - 04:32:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive