Displaying 20 results from an estimated 20000 matches similar to: ".Random.seed in R-devel"
2004 Aug 19
3
More precision problems in testing with Intel compilers
The Intel compiled version also fails the below test:
> ###------------ Very big and very small
> umach <- unlist(.Machine)[paste("double.x", c("min","max"), sep='')]
> xmin <- umach[1]
> xmax <- umach[2]
> tx <- unique(outer(-1:1,c(.1,1e-3,1e-7)))# 7 values (out of 9)
> tx <- unique(sort(c(outer(umach,1+tx))))# 11 values
2004 Mar 31
3
Maximum number of connections in R
It appears that the maximum number of connections available
in R is about 48. Can anyone tell me how to bump this number
up? I've been perusing the source, but any info would speed
things up.
Is there a reason that it was set to such a low number?
Thanks for any help.
-Frank
2004 Feb 09
2
moments, skewness, kurtosis
I checked the help and the mailing list archives, but I can
find no mention of a routine that calculates higher
moments like skewness and kurtosis. Of course, these
are easy enough to write myself, but I was thinking
that they MUST be in here. Am I wrong?
Thanks.
-Frank
2004 Feb 11
1
how much memory? was: R does in memory analysis only?
Is there a way to tell how much memory the computer
running R has?
-Frank
-----Original Message-----
From: David Smith [mailto:dsmith at insightful.com]
Sent: Monday, February 09, 2004 1:32 PM
To: Ross Boylan
Cc: r-help
Subject: RE: [R] R does in memory analysis only?
Ross Boylan writes:
> R works only on problems that fit into (real or virtual) memory.
> ... does S-Plus have the same
2005 Jan 28
3
avoiding loops
Hi again,
thanks a lot for the quick answer. I just forgot the comma, always
these stupid mistakes...
Anyways, as I said before, I have two data.frames containing about 1000
rows and I would like to avoid looping through all of them...
In each data.frame are coordinates (x,y,z), so every row is giving the
information on one single point.
I would like to calculate the distance from each point
2004 Sep 13
6
Spare some CPU cycles for testing lme?
If anyone has a few extra CPU cycles to spare,
I'd appreciate it if you could verify a problem that I
have encountered. Run the code
below and tell me if it crashes your R before
completion.
library(lme4)
data(bdf)
dump<-sapply( 1:50000, function(i) {
fm <- lme(langPOST ~ IQ.ver.cen + avg.IQ.ver.cen, data = bdf,
random = ~ IQ.ver.cen | schoolNR);
cat("
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
2013 Jun 07
0
[Rcpp-devel] Setting the R random seed from Rcpp
This would be easier if base::set.seed() accepted a value of .Random.seed
instead of just a scalar integer or, new to R-3.0.0, NULL. If set.seed() returned the
previous value of .Random.seed (NULL if there was no previous value) things
might be even easier. People should not have to know where .Random.seed
is stored.
S+'s set.seed() accepts a value of .Random.seed but does not return the
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 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
2006 Oct 24
1
set.seed() and .Random.number
Hi R-users
I have two conditions. For each condition, 100 sets of 10 random numbers
from N(0,1) need to be generated. Here is my question.
At the begining I specify a seed number. I want to make the 100th set of the
first condition and 1st set of the second conditon the same. What do I need
to do ?
After generating 99th set of 10 random numbers and then saving .Random.seed
then using
2003 Jun 10
1
SOM random seed
Hi all,
I have a question about the SOM routine. You can either supply the
initial representatives for the lattice yourself or else they are
chosen randomly from the dataset. Is it possible to pass the
random-seed as an argument somehow, when choosing the random
initialisation of the lattice?
As it is now, each time I run a SOM on a dataset with the same settings
the resulting SOM will still
2011 Nov 05
1
set seed for random draws
Hello, all!
I need help on these two problems:
1) If I want to randomly draw numbers from standard normal (or other distributions) in loops e.g.:
ty=0; ks=0
for (i in 1:5) {
set.seed(14537+i)
k<-rnorm(1)
ks[i]<-.3*k+.9
if (ty==0) {
while ((ks<.2)||(ks>3)) {
#set.seed(13237+i*100)
k<-rnorm(1)
2004 Aug 12
1
.Random.seed error
I have this snippet of code from an example in Dr. Harrel's book "Regression
Modeling Strategies" p 501
n<-2000
.Random.seed <-c(49,39,17,36,23,0,43,51,6,54,50,1)
age <-50 + 12 * rnorm(n)
age
I get the error message: Error in rnorm(n) : .Random.seed[1] is NOT a valid
RNG kind (code)
I have tried this on Windows and Linux R versions 1.8.1, 1.9.0, and 1.9.1
2008 Apr 05
1
Random seed not reset when starting R (PR#11089)
Full_Name: Pall Melsted
Version: 2.3.1
OS: WinXP
Submission from: (NULL) (71.240.25.175)
Random set is not reset when starting R again. When R starts with a
[Previously saved workspace restored]
it seems that the .Random.seed variable is already set. If you quit R (and don't
save your workspace) the next time you start R .Random.seed will be set to the
same value again.
Steps to
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
2012 May 22
2
how to remove the 'promise' attribute of an R object (.Random.seed)?
Hi,
The problem arises when I lazyLoad() the .Random.seed from a
previously saved database. To simplify the process of reproducing the
problem, see the example below:
## this assignment may not really make sense, but illustrates the problem
delayedAssign('.Random.seed', 1L)
typeof(.Random.seed)
# [1] "integer"
rnorm(1)
# Error in rnorm(1) :
# .Random.seed is not an integer
2012 May 22
2
how to remove the 'promise' attribute of an R object (.Random.seed)?
Hi,
The problem arises when I lazyLoad() the .Random.seed from a
previously saved database. To simplify the process of reproducing the
problem, see the example below:
## this assignment may not really make sense, but illustrates the problem
delayedAssign('.Random.seed', 1L)
typeof(.Random.seed)
# [1] "integer"
rnorm(1)
# Error in rnorm(1) :
# .Random.seed is not an integer
2001 Apr 12
1
.Random.seed (PR#911)
I am not sure whether this is really a bug, but seems to be as my program
works pretty well in S+, for small iterations.
I am creating a random sample from a chi^2 distribution with 23.5 df. Thus
I have to sample from a chi^2 with 23 or 24 df with probability 0.5. The
other alternative is to create a weighted version of the two distribution,
which is where my problem lies.
I use the