Skip to content

set_seed

7 messages · Nikom Thanomsieng, Thomas Lumley, Brian Ripley +3 more

#
Dear Sir,
   I would like to set seed in R before this command
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:

            
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:

            
[This is a list: there are a few hundred of us.]
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.
#
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Upgrade to version 1.0.0.  (Aren't you glad it's free?)

from the NEWS file:

    o New functions by() and merge() to split and join data frames.
On Tue, 7 Mar 2000, Richard A. Bilonick wrote:

  
    
#
"Richard A. Bilonick" <rab at nauticom.net> writes:
*Everywhere?*

http://www.r-project.org/bin/linux/redhat/6.x/i386/R-base-1.0.0-1.i386.rpm
#
Ben Bolker wrote:

            
I would gladly upgrade to 1.0.0 if I could find an i386 RPM for it. I've searched
everywhere and can't find one. The closest I've come is R-base-0.99.0.4.i386.rpm.

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._