[R] "Raw" histogram plots

Henrique Dallazuanna wwwhsd at gmail.com
Wed Feb 27 14:46:59 CET 2008


If I understand:

x <- rnorm(1e6)
out <- tapply(x, ceiling(x), length)
plot(as.numeric(names(out)), out)

On 27/02/2008, Andre Nathan <andre at digirati.com.br> wrote:
> On Wed, 2008-02-27 at 14:15 +1300, Peter Alspach wrote:
>  > If I understand you correctly, you could try a barplot() on the result
>  > of table().
>
>
> Hmm, table() does the counting exactly the way I want, i.e., just
>  counting individual values. Is there a way to extract the counts vs. the
>  values from a table, so that I can pass them as the x and y arguments to
>  plot()?
>
>
>  Thanks,
>  Andre
>
>  ______________________________________________
>  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.
>


-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list