Dear Sir, I would like to set seed in R before this command>B <- 10 >x <- rnorm(15)for (i in 1:B) {boot.sample <- print(sample(x,replace=T)) } ...>for reason of stable of data output. How I do ? Best Regards, Nikom Thanomsieng Department of Biostatistics & Demography, Faculty of Public Health, Khon Kaen University, Thailand. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 8 Mar 2000, Nikom Thanomsieng wrote:> Dear Sir, > I would like to set seed in R before this command > >B <- 10 > >x <- rnorm(15) > for (i in 1:B) > {boot.sample <- print(sample(x,replace=T)) > } > ... > > > for reason of stable of data output. How I do ?Use the set.seed function. -thomas Thomas Lumley Assistant Professor, Biostatistics University of Washington, Seattle -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 8 Mar 2000, Nikom Thanomsieng wrote:> Dear Sir,[This is a list: there are a few hundred of us.]> I would like to set seed in R before this command > >B <- 10 > >x <- rnorm(15) > for (i in 1:B) > {boot.sample <- print(sample(x,replace=T)) > } > ... > > > for reason of stable of data output. How I do ?If you have R 1.0.0 (or 0.99.0) use the function set.seed, as in set.seed(54321). If not, we suggest you upgrade (although it can be done by setting .Random.seed: see ?Random). I am not sure what you are doing, but as it is often helpful not to re-invent the wheel you might like to look at package boot. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I need to merge several data.frames into one data.frame. In S-Plus I would use "merge" but I don't see a merge command in R. What is the best way to accomplish this? Thanks. Rick Bilonick -- Statistical Consulting for Business & Industry mailto:rab at nauticom.net efax: 508 445 5821 voice: 412 831 4509 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._