[R] how to modify the histogram's frequencies

Jim Lemon jim at bitwrit.com.au
Mon Apr 28 10:21:52 CEST 2008


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



More information about the R-help mailing list