The documentation for sample() describes the optional "prob" argument as "A vector of probabilities of obtaining the elements of the vector being sampled". Both run time behavior and source code (routine FixupProb) suggest that "prob" can be a vector of non-negative, relative weights (i.e. not necessarily normalized). Should the help be updated to reflect this? Regards, -jh- ========================================John M. Heumann, Agilent Technologies 815 14th St. S.W., Loveland, CO 80537 USA Email: john_heumann at agilent.com Phone: 970 679-3761 FAX: 970 679-5399 ========================================-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"HEUMANN,JOHN (A-Loveland,ex1)" <john_heumann at agilent.com> writes:> The documentation for sample() describes the optional "prob" > argument as "A vector of probabilities of obtaining the > elements of the vector being sampled". > > Both run time behavior and source code (routine FixupProb) > suggest that "prob" can be a vector of non-negative, > relative weights (i.e. not necessarily normalized). > Should the help be updated to reflect this?Can't hurt. Done. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._