[R] Query: weighting cells in histogram
Thomas W Blackwell
tblackw at umich.edu
Thu Oct 2 17:13:56 CEST 2003
Marten -
I don't know exactly what interpretation you have in mind
for weights, but if you assign the value of hist() to a
variable tmp, you can then assign the component tmp$counts
any value you like, and plot the result as a histogram
using plot(tmp). See the section "Value:" in help("hist").
- tom blackwell - u michigan medical school - ann arbor -
On Thu, 2 Oct 2003, [iso-8859-1] Mårten Bjellerup wrote:
> I have the 'breaks' for the histogram ('hist') but I want
> to weight the cells instead of using actual observations.
> I thought that using freq=FALSE implied that the numbers
> in 'x' were weights but this turned out to be wrong.
> Any help and/or comment is very much appreciated.
>
> Regards,
>
> Mårten
>
> Mårten Bjellerup
> Doctoral Student in Economics
> School of Management and Economics
> Växjö University
> SE-351 95 Växjö
> Sweden
>
> Tel: +46 470 708410
> Fax: +46 470 82478
> Mobile: +46 70 969 88 88
> Mail: marten.bjellerup at ehv.vxu.se
> Web: http://www.ehv.vxu.se
More information about the R-help
mailing list