Re: [R] Sampling given a table of percentages?

2005-02-17 Thread Ben Hyde
Thank you one and all for the answer to my question, I just knew it 
would be painfully obvious.   sample, duh.

__
R-help@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


[R] Sampling given a table of percentages?

2005-02-16 Thread Ben Hyde
I have a vector V.  sum(V) = 100, i.e. it's percentages.  length(V) is 
large.  I wish to generate samples (with replacement is fine), 
integers, in the range 1:length(V) who's distribution is driven by the 
distribution implied by the percentages in V.V is unsorted, but 
that could change.  I'd rather not be too specific about the 
distribution of V.I can certainly solve the problem intersecting my 
thin knowledge of R with my skills in programming, but I suspect this 
is trivial to somebody fluent in R.   Suggestions?  Thanks!  - ben


http://enthusiasm.cozy.org/   -- blog
tel:+1-781-240-2221  -- mobile, et.al.
__
R-help@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