[R] using R to draw over a distribution.

SHANE MILLER, BLOOMBERG/ 731 LEXIN smiller53 at bloomberg.net
Mon Jun 14 16:42:11 CEST 2010


Hi,

Suppose I analyze a log to create a histogram:

event E1 occurred N1 times
event E2 occurred N2 times
  ...
  ... for m total events
  ...
event Em occurred Nm times

The total number of occurrences is: T = Sum    Nj
                                        j=1..m

I want to give this histogram to R and ask it to produce T random events such that approximately N1 instances of E1 are drawn, N2 instances of E2 drawn, and so forth.

Regards,
Shane


More information about the R-help mailing list