[R] generate random number
Kaspar Pflugshaupt
pflugshaupt at cirsium.ethz.ch
Wed Mar 21 08:31:52 CET 2001
On Wednesday 21 March 2001 02:15, Yu-Ling Wu wrote:
> Hi,
>
> I want to pick 3 "integer" random numbers from 1 to
> 10. How to do this?
as.integer(runif(3)*10+1)
Cheers
Kaspar Pflugshaupt
--
Kaspar Pflugshaupt
Geobotanical Institute
ETH Zurich, Switzerland
http://www.geobot.umnw.ethz.ch
mailto:pflugshaupt at geobot.umnw.ethz.ch
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list