Re: [R] Draw curve for histogram

From: Kenn Konstabel <lebatsnok_at_gmail.com>
Date: Fri, 20 Jun 2008 15:23:58 +0300

On Fri, Jun 20, 2008 at 2:47 AM, Anh Tran <popophobia_at_gmail.com> wrote:

> Thanks. I think I've got it. However, the density is plotted, not the
> frequency. Is there a way to convert the density back to frequency.
> Thanks a bunch.
>
>
an easy answer is that hist returns an object which you plot in any way you like. for example,

x <- rnorm(100)
foo <- hist(x, plot=FALSE)
foo
plot(foo$mids, foo$counts, type="l")

        [[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. Received on Fri 20 Jun 2008 - 12:39:05 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 Fri 20 Jun 2008 - 13:30:47 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