[R] Obtaining midpoints of class intervals produced by cut and table
Gabor Grothendieck
ggrothendieck at gmail.com
Sun Nov 8 22:45:30 CET 2009
Try this:
library(gsubfn)
demo("gsubfn-cut")
and note the strapply call that converts the levels from cut to a matrix.
On Sun, Nov 8, 2009 at 4:08 PM, jose romero <jlaurentum at yahoo.com> wrote:
> Hello list:
>
> I am using "cut" and "table" to obtain a frequency table from a numeric sample vector. The idea is to calculate mean and standard deviation on grouped data. However, I can't extract the midpoints of the class intervals, which seem to be strings treated as factors. How do i extract the midpoint?
>
> Thanks,
> jose loreto
>
>
> [[alternative HTML version deleted]]
>
>
> ______________________________________________
> 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.
>
>
More information about the R-help
mailing list