[R] Add function to histogram?
Francisco J. Zagmutt
gerifalte28 at hotmail.com
Thu Sep 22 00:11:18 CEST 2005
To be more precise, when using hist(prob=T) the y axis shows the densities.
If you want relative frequencies (proportions) you can use the histogram(x,
type=) function in the package lattice or write your own function.
Cheers
Francisco
>From: Vincent Goulet <vincent.goulet at act.ulaval.ca>
>Reply-To: vincent.goulet at act.ulaval.ca
>To: r-help at stat.math.ethz.ch
>Subject: Re: [R] Add function to histogram?
>Date: Wed, 21 Sep 2005 17:10:55 -0400
>
>Le 20 Septembre 2005 09:53, Robert Lundqvist a écrit :
> > Is there any neat way to add a curve (frequency function or the like) to
>a
> > histogram or other plots? I haven't found one yet...
>
>The one key thing here is not to forget "prob=TRUE" in the call to hist(),
>to
>ensure that the y-axis is scaled in proportions, not in frequencies.
>
>--
> Vincent Goulet, Professeur agrégé
> École d'actuariat
> Université Laval, Québec
> Vincent.Goulet at act.ulaval.ca http://vgoulet.act.ulaval.ca
>
>______________________________________________
>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