similar to: R-alpha: set.seed(.) [was 'compatibility']

Displaying 20 results from an estimated 6000 matches similar to: "R-alpha: set.seed(.) [was 'compatibility']"

1997 Nov 24
0
R-alpha: random number generator -- S-plus's
--Multipart_Mon_Nov_24_14:51:09_1997-1 Content-Type: text/plain; charset=US-ASCII >>>>> "PaulG" == Paul Gilbert <pgilbert@bank-banque-canada.ca> writes: MM> The code is basically in V&R 1 and 2; V&R2 on p.167. I have it as a MM> C function that I used to dyn.load into S-plus in order MM> to prove that S-plus was using it.
1999 Apr 29
0
Problems with setting .Random.seed (PR#179)
I have commited fixes for 0.64.1 for (1) From: Mai Zhou <mai@ms.uky.edu> > .Random.seed <- c(1, 1:2) > .Random.seed [1] 1 1 2 > runif(5) Warning: Wrong length .Random.seed; forgot initial RNGkind? set to Wichmann-Hill[1] 0.02253721 0.84832584 ........ Here the length of the seed was being tested before the kind was picked out, so the length of the previous type was used. (2)
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 Jan 02
1
setting the seed in standalone code using Rlib
Hi, Is the below -- setSeed -- an okay way to set the seed in standalone applications making use of Rlib? It seems to work as expected. Is there a better way to do it? (I'm also looking at do_setseed but am unsure what to supply as op. findFun("set.seed", R_GlobalEnv)?) Thanks much. -- David Faden, dfaden at iastate.edu AIM: pitulx -- #include <assert.h> #include
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,
1997 Jul 25
0
R-alpha: Treatment of seed
There is a difference between R and S (or S-Plus, I'm not sure about that) concerning the generation of random numbers. If an error occurs during the execution of a function, the seed is restored to its old value in S-Plus, but not in R. This feature of S-Plus has just turned out to be very useful for me because I got an error message during a small simulation for a certain choice of
2011 Nov 03
2
Take variables in data.frame and create list of matrices
Hi, I have this sample data below and would like to create a list of matricies. setseed(1254) id <- c(1,1,1,1 ,2,2,2) o <- as.factor(c(1:4, 1, 3, 4)) r <- rep(.5, 7) v <- rnorm(7) s <- rnorm(7) dat <-data.frame(id, o, r, v, s) dat #> dat # id o r v s # 1 1 0.5 0.7024631 2.0813672 # 1 2 0.5 -0.5541955 0.1095156 # 1 3 0.5 -1.0418167 0.4164930 # 1
1997 Nov 04
0
R-alpha: compatibility functions
Below is a revised copy of my compatibility functions with additions from Martin. I expect I may need a new version when 0.6 arrives but I thought it would be worth circulating this in case it suggests anything which might be resolved before the release of 0.6 rather than after. Thanks to a few people for pointing out the R function machine(). I have a kludge below for determining the same
1999 Jan 01
0
RE: timeslab
On 01-Jan-99 Prof Brian Ripley wrote: > -rw-rw---- 1 root sysadmin 188267 Jan 1 06:20 > timeslab-1.0-1.tar.gz > -rw-rw-r-- 1 root sysadmin 180290 Jan 1 02:02 > timeslab-1.0.tar.gz > > So which is which, what's the difference? .... Sorry if this wasn't self evident: timeslab-1.0.tar.gz == timeslab-1.0-0.tar.gz and thus
2011 Mar 27
0
setseed() works well
I tried the following comm in Linux(Ubuntu), It works well: >set.seed(43);runif(3):rnorm(3) >set.seed(43);runif(3);rnorm(3) At 2011-03-26 19:00:05£¬r-sig-debian-request@r-project.org wrote: >Send R-SIG-Debian mailing list submissions to > r-sig-debian@r-project.org > >To subscribe or unsubscribe via the World Wide Web, visit >
1997 Dec 11
0
R-alpha: "[.ts" warning "Not returning time series.."
On 11-Dec-97 maechler@stat.math.ethz.ch wrote: >>>>>> "PaulG" == Paul Gilbert <pgilbert@bank-banque-canada.ca> writes: > > PaulG> I have a class "tframe" with more specific classes indicating > PaulG> how time is being represented, such as > > >> class(tframe(data)) > PaulG> [1] "ts"
1997 Apr 30
0
R-alpha: Re: R-beta: Re: S Compatibility
Peter Dalgaard writes: > > Its something we definitely need (almost as much as REAL libraries). > > If only there were another 24 hours in each day ... > No problem. You just need someone as smart as you are to chip in with > the development. Or four people half as smart ;^) Or half the time of someone twice as smart ... Did I see you putting your hand up? :-) > There
1997 Apr 09
2
R-alpha: R <-> S compatibility; more demos -- using S-plus validate(..) ..
Look at the result of (in S-plus:) validate(verbose=TRUE, outfile="......./validate-3.4.out") which gives (for me, S-plus 3.4 on Solaris 2.5) 2106 Lines of output. It's full of tests using "standard data sets". (--> 'demos' available!) Basically, at the end of each example, there are statements which should return TRUE if the 'validation test' is
2010 Feb 04
1
How to choose "seed" in set.seed(seed, ...)?
Greetings. I understand that to generate distinct sequences of random numbers in R one can initialize the calculation of each sequence by calling the set.seed() function with a distinct value for "seed" the (integer) first argument to the function. I'd like to know if there are any guidelines or best practices for choosing "seed". I.e., is it OK just to choose seed as
2003 Apr 01
0
Answer to .Random.seed vs. set.seed
Here is the answer to the .Random.seed vs. set.seed question: On Tue, 1 Apr 2003, Erin Hodgess wrote: > Dear R People: > > What is the difference betwween > .Random.seed <<- seed > > vs. > set.seed > > please? 1) In the first you have to know a suitable value for `seed', and that's far from easy, whereas in the second you can supply a number in
2011 Aug 04
1
How to seed the R random number generator in C (standalone) with an instance of .Random.seed
hello all, I use the R standalone math library in my own C program, and the default R random number generator can be seeded with set_seed(const unsigned int, const unsigned int). How could I seed the RNG with an instance of .Random.seed ? I would need this or a similar workaround for debugging purposes. More precisely, I use the default R random number generator to sample from various
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
2012 Nov 02
1
An idea: Extend mclapply's mc.set.seed with an initial seed value?
Hello, Have been thinking that sometimes users may want each process to initialize its random seed with a specific value rather then the current seed. This could be keyed off depending whether mc.set.seed is logical, preserving the current behaviour, or numerical, using the value in a call to set.seed. Does this make sense? If you wonder how I came up with the idea: I spent a couple of hours
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
2007 Sep 23
0
initial scrambling of seed in do_setseed / RNG_Init
I would like to suggest a modification of initial scrambling of the seed in RNG_Init (called from do_setseed). The modified code is equivalent, but faster. Patch against R-devel_2007-09-22 follows --- R-devel-orig/src/main/RNG.c 2007-09-02 07:49:35.000000000 +0200 +++ R-devel-modif/src/main/RNG.c 2007-09-23 10:51:59.234566440 +0200 @@ -216,8 +216,8 @@ BM_norm_keep = 0.0; /* zap Box-Muller