Re: [R] how to modify the histogram's frequencies

From: Jim Lemon <jim_at_bitwrit.com.au>
Date: Mon, 28 Apr 2008 18:21:52 +1000

marcelha mukim wrote:
> Hi Sarah:
>
> Thank you very much, but my problem remains. What I want is not duplicate
> the sample, but be able to divide each frequency for a factor(specific for
> each value).For example:
>
> Values 1 2 3 4 5
> Frequency 10 34 56 67 98
> Factor 105 50 60 150 200
>
> Actually Im plotting: plot(Values, Frequency/Factor, type="b"). But I dont
> know how to visualize the probability distribution. On the hand to modify
> the "hist" function to include this Factor seems to be a daunting task.
>
Hi Marcelha,
Are you trying to create a weighted histogram? If so, have a look at weighted.hist in the plotrix package.

Jim



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 Mon 28 Apr 2008 - 08:23:06 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 Mon 28 Apr 2008 - 09:30:34 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