search for: rngstate

Displaying 3 results from an estimated 3 matches for "rngstate".

Did you mean: regstate
2009 Feb 12
3
proposed simulate.glm method
...ere is no specific documentation for simulate.lm) cheers Ben Bolker simulate.glm <- function (object, nsim = 1, seed = NULL, ...) { ## RNG stuff copied from simulate.lm if (!exists(".Random.seed", envir = .GlobalEnv, inherits = FALSE)) runif(1) if (is.null(seed)) RNGstate <- get(".Random.seed", envir = .GlobalEnv) else { R.seed <- get(".Random.seed", envir = .GlobalEnv) set.seed(seed) RNGstate <- structure(seed, kind = as.list(RNGkind())) on.exit(assign(".Random.seed", R.seed, envir = .GlobalEnv)) } ## get...
1998 Dec 01
0
Random Number Generators, .Random.seed and all that..
...the new scheme, we still want that save(..) & load(..) restore the state of the RNG. The new state is [ RNGkind ; "seed" of that RNG ]. "seed" really means the state of the chosen RNG 1b. For compatibility reasons, it makes sense to keep this RNGstate in the integer vector .Random.seed. Before each RN generation, .Random.seed is read into the internal RNG state variables; afterwards .Random.seed is restored from there. 1c. In the future, .Random.seed[1] == <code of RNGkind> .Random.seed[2:ns] == "seed&quot...
2007 Mar 03
0
2 bugs in max.col() (PR#9542)
...} } # -- C -------------- // Author: Jens Oehlschl?gel // Date: 3.3.2007 // Provided 'as is' under GPL // Use at own risk #include <R_ext/Arith.h> /* NA handling */ #include <Rmath.h> /* probably not needed */ #include <R_ext/Random.h> /* ..RNGstate */ #include <R_ext/Applic.h> /* NA handling */ #include <R_ext/Utils.h> /* probably not needed */ #define RELTOL 1e-5 void R_row_maxwithindex_double( double *x , int *nr , int *nc , int *narm , int *index , int *tiesmethod ) { int r, c, m, ntie, n_r = *nr, n_c = *n...