search for: seeds

Displaying 20 results from an estimated 4693 matches for "seeds".

Did you mean: needs
2009 Mar 21
2
factor with numeric names
Hi all, I have a pretty basic question about categorical variables but I can't seem to be able to find answer so I am hoping someone here can help. I found that if the factor names are all in numbers, fitting the model in lm would return labels that are not very recognizable. # Example: let's just assume that we want to fit this model fit <- lm(height ~ age + Seed,
2000 Aug 31
1
slightly overzealous RNG seeding?
Hello again, I was testing today's SNAP (openssh-SNAP-20000830.tar.gz) in my Solaris 2.6-8 environment, when I found some problems with the ssh2 support. While connecting, it seeds the RNG something like 32 times! And then once connected, it seeds again 2 or 3 times with *every* keystroke! This makes for some slow going. This happens on all of the Solaris boxes I tried. Binary was compiled on 2.6 against OpenSSL 0.9.5a. Output follows: 6:19pm.orangecrush: ~# ssh -2 -...
1999 May 05
1
RNG R/Splus compatibility
Starting with example Wichmann-Hill code from Brian Ripley I have been playing with a set of programs for getting the same random sequences from R and Splus. A copy is included below along with a test (which works in Solaris with R and Splus 3.3). The approach is somewhat different from the usual problems on this list as I am trying to get the same results from Splus as I get from R. However,
2013 May 08
4
Correctly Setting New Seed
Could someone please suggest a method to store the current random seed. I'm having trouble understanding how to correctly use set.seed and .Random.seed. Specifically, I have the following code that crashes: set.seed(seed) for(i in 1:10){ print( runif(1)) } To get around this I need to split the number of iterations into chunks: set.seed(seed) for(i in 1:5){ print(runif(1))
2017 Dec 08
2
Curiously short cycles in iterated permutations with the same seed
...112364 Cycle: 10 Seed: 112365 Cycle: 10 Seed: 112366 Cycle: 10 Seed: 112367 Cycle: 9 Seed: 112368 Cycle: 12 I understand that I am performing the same permutation operation over and over again - but I don't see why that would lead to such a short cycle (in fact the cycle for the first 100,000 seeds is never longer than 30). Does this have a straightforward explanation? Thanks! Boris
2013 Jan 23
3
How to construct a valid seed for l'Ecuyer's method with given .Random.seed?
Dear expeRts, I struggle with the following problem using snow clusters for parallel computing: I would like to specify l'Ecuyer's random number generator. Base R creates a .Random.seed of length 7, the first value indicating the kind fo random number generator. I would thus like to use the components 2 to 7 as the seed for l'Ecuyer's random number generator. By doing so, I
2003 Oct 16
2
.Random.seed
I am writing a function for the purposes of a simulation. Due to memory problems, the function sometimes crashes. In order to get around this problem, I would like to include to be able to save the "last" seed, so I can pick up with the next run of the simulation after a "crash". I am having trouble understanding what is going on with .Random.seed! For each run of the
1997 Sep 13
1
R-alpha: compatibility
Two compatibility issues found while trying to convert a simulation from S to R. 1. set.seed() We don't have this function. According to Venables & Ripley it just picks a seed from a list of 1000 possibilities. How about "set.seed" <-function (i) { if (any(i > 1000) | any(i < 1)) stop("argument to set.seed() must be in 1:1000")
2008 Feb 13
3
Best way to reset random seed when using set.seed() in a function?
Hi, this is related to a question just raised on Bioconductor where one function sets the random seed internally but never resets it, which results in enforced down streams random samples being deterministic. What is the best way to reset the random seed when you use set.seed() within a function? Is it still to re-assign '.Random.seed' in the global environment as following example
2012 Jan 06
1
How to properly re-set a saved seed? I've got the answer, but no explanation
...technically correct method to save a seed and then re-set it. Although this example arises in the context of MT19937, I'm needing to do this with other generators as well, including L'Ecuyer streams. The puzzle is this comment in ?Random: "?set.seed? is the recommended way to specify seeds." What I did not understand before, and can't make sense of now, is that set.seed does not "re-set" a saved seed. Here's my working example: ## Paul Johnson ## April 20, 2011 ## If you've never dug into the R random number generator and its use of the ## default MT19...
2007 Sep 23
0
initial scrambling of seed in do_setseed / RNG_Init
...pply the entry point 'user_unif_init', which is called with an 'unsigned int' argument when 'RNGkind' (or 'set.seed') is called, and is intended to be used to initialize the user's RNG code. The argument is intended to be used to set the "seeds"; it is the 'seed' argument to 'set.seed' or an essentially random seed if 'RNGkind' is called. I want to comment on the sentence The argument is intended to be used to set the "seeds"; it is the 'seed' argument to 'set.seed' or ......
2012 Nov 07
3
c weirdness
is there a way to avoid c() appending ".0" and ".1" to seed? --8<---------------cut here---------------start------------->8--- > c("nons"=1, "seed"=3) nons seed ## good! 1 3 > c("nons"=1, "seed"=tab[1]) nons seed.0 ## don't want ".0"! 1 2344600 >
2005 Dec 06
2
Constructing a transition matrix
Hi, I would like to construct a transition matrix from a data frame with annual transitions of marked plants. plant<-c(1:6) class<-c("seed","seed", "seed", "veg", "rep", "rep") fate<-c("dead", "veg","veg","rep", "rep", "veg") trans<-data.frame(plant, class, fate)
2017 Dec 08
0
Curiously short cycles in iterated permutations with the same seed
...t; Seed: 112366 Cycle: 10 > Seed: 112367 Cycle: 9 > Seed: 112368 Cycle: 12 > > I understand that I am performing the same permutation operation over and > over again - but I don't see why that would lead to such a short cycle (in > fact the cycle for the first 100,000 seeds is never longer than 30). Does > this have a straightforward explanation? > > > Thanks! > Boris > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PL...
2019 Oct 30
2
set.seed() in a package
...iour. See https://github.com/sammo3182/interplot/issues/33 <https://github.com/sammo3182/interplot/issues/33> for a description of the problem. > >>> I checked the CRAN repository policies and could not find anything about this. I would have expected a policy against setting fixed seeds somewhere in a package. Am I missing something? > >> > >> set.seed() writes .Random.seed in the user's global environment, which violates this policy: > >> > >> - Packages should not modify the global environment (user?s workspace). > >> > >&gt...
2007 May 31
1
Restoring .Random.seed
Hi. Suppose I have a function which does some random number generation within. The random number generation inside the function changes the value of .Random.seed in the calling environment. If I want to restore the pre-function call .Random.seed, I can do: save.seed<-.Random.seed result<-myfunction() .Random.seed<-save.seed Is there a way to do the restoration inside the function?
2008 Aug 20
2
Reading in a value of .Random.seed in .Rprofile
For reasons that are best known to myself [ ;-) ] I have a value of .Random.seed saved (via dput()) in a file ``.Random.seed.save''. In my .Rprofile I have the lines: .Random.seed <- dget(".Random.seed.save") Junk <- dget(".Random.seed.save") print(all.equal(.Random.seed,dget(".Random.seed.save")))
2017 Nov 03
1
Extreme bunching of random values from runif with Mersenne-Twister seed
...Regardless, let me try to address some of the concerns related to the construction of the MRE itself and try to see if we can clean away the shrubbery & zero down on the core issue, since I continue to believe that this is an issue with either R's implementation or a bad interaction of the seeds supplied with the Mersenne-Twister algorithm itself. The latter would require a deeper understanding of the algorithm than I have at the moment. If we can rule out the former through this thread, then I will pursue the latter solution path. Responses inline below, but summarizing: 1. All examples...
2018 Mar 04
2
Random Seed Location
The following helps identify when .GlobalEnv$.Random.seed has changed: rng_tracker <- local({ last <- .GlobalEnv$.Random.seed function(...) { curr <- .GlobalEnv$.Random.seed if (!identical(curr, last)) { warning(".Random.seed changed") last <<- curr } TRUE } }) addTaskCallback(rng_tracker, name = "RNG tracker") EXAMPLE: >
2018 Mar 04
0
Random Seed Location
On 04/03/2018 5:54 PM, Henrik Bengtsson wrote: > The following helps identify when .GlobalEnv$.Random.seed has changed: > > rng_tracker <- local({ > last <- .GlobalEnv$.Random.seed > function(...) { > curr <- .GlobalEnv$.Random.seed > if (!identical(curr, last)) { > warning(".Random.seed changed") > last <<- curr