Displaying 20 results from an estimated 3000 matches similar to: "Random number generator used in 'runif'"
2013 Feb 21
1
limitations to random number generator in 64-bits machines
Dear List,
Recently I got the comment that the implementation of the random number
generator used by default in R (Mersenne-Twister) could not be "safe"
for 64-bits machines, so I decided to put the question here because I do
not have expertise in that topic, and because this question could be
"too technical for R-help's audience". I apologise if this is not the case.
2013 May 03
2
Licence change
Dear list,
For the maintainer of a given package, is it possible to change the
licence of a it from GPL >= 2 to GPL >= 3 ?
Thanks in advance,
Mauricio Zambrano-Bigiarini, Ph.D
--
=================================================
Water Resources Unit
Institute for Environment and Sustainability (IES)
Joint Research Centre (JRC), European Commission
TP 261, Via Enrico Fermi 2749, 21027
2012 Mar 08
2
xyplot without external box
Dear list members,
Within a loop, I need to create an xyplot with only a legend, not even
with the default external box drawn by lattice.
I already managed to remove the axis labels and tick marks, but I
couldn't find in the documentation of xyplot how to remove the
external box.
I would really appreciate any help with this
------------- START -----------
library(lattice)
x<-1:100
2012 Nov 05
1
relative convergence in 'optim'
Dear list,
I have a question related to the correct interpretation of the
relative convergence criterion used by 'optim'.
In the help of the function is it written that:
"reltol:Relative convergence tolerance. The algorithm stops if it is
unable to reduce the value by a factor of reltol * (abs(val) + reltol)
at a step."
and I was wondering if the previous criterion is
2012 Nov 22
2
BibTeX entries in CITATION file
Dear List,
While trying to define a customised CITATION file for a package,
following R-exts, I realised that if I use only one 'citEntry' I got
both a text description and a BibTex entry for the package, as for the
'nlme' package:
--------------------------
citation('nlme')
To cite package 'nlme' in publications use:
Jose Pinheiro, Douglas Bates, Saikat
2011 Jul 22
1
Start-up messages when Importing from a package
Dear List,
I'm building a package that uses 2 functions of the 'sp' package, and I
declared them in my NAMESPACE file as follow:
importFrom("sp", proj4string, coordinates)
The package is built without any problem, but when I load the package, I
get the following message:
"
Loading required package: sp
Note: polygon geometry computations in maptools
2012 Nov 07
2
Correct use of Depends, Imports and ::
Dear R developers,
Taking advantage of the yesterday discussion about the use of
Depends/Import/Suggests/Enhances, I would like to add a related question.
Let's assume, in the DESCRIPTION file of my package foo0, I have:
Depends: foo1
Imports: foo2
while in the NAMESPACE file of my package I have
importFrom("foo2", f2)
and within my package I use the following two external
2012 Feb 13
1
requesting a new SIG mailing list
Dear R developers,
Due to the increasing use R in hydrology and other close-related
environmental sciences, I would like to ask if it would be possible to
create a new Special Interest Group mailing list, called 'R-sig-hydro',
specially devoted those topics. If possible to do so, I'd offer myself
to maintain such mailing list (if needed).
Thanks in advance,
Mauricio
2012 May 02
1
--as-cran error
Dear List,
While using the --as-cran option for checking one of my packages:
R CMD check --as-cran hydroGOF_0.3-3.tar.gz
I got the following error message:
pkgname <- "hydroGOF"
> source(file.path(R.home("share"), "R", "examples-header.R"))
> options(warn = 1)
> library('hydroGOF')
Error in loadNamespace(i[[1L]], c(lib.loc,
2006 Aug 28
1
Speed of runif() on different Operating Systems
Dear list,
I have noticed surprisingly big performance differences of runif()
between Windows XP and (Debian) linux on similar CPUs (Pentium D 3.0GHz
(WinXP)/3.2GHz (Linux)) and I wonder if there is a simple explanation
for the difference.
On a linux system (with a slightly better CPU and 1GB more RAM),
execution of runif() seems to consume about 80% more CPU time than on a
Windows XP
2003 Oct 20
1
Random Number Generator RNGkind() under "R CMD check" (PR#4691)
Full_Name: Wolfgang Huber
Version: 1.8.0
OS: Linux
Submission from: (NULL) (193.174.58.146)
The man page for RNGkind says that the default is Mersenne-Twister, and when I
start R interactively, I get in fact
> RNGkind()
[1] "Mersenne-Twister" "Inversion"
However, during the execution of "R CMD check" I get
> > ### ** Examples
> >
> > RNGkind()
2008 Aug 17
1
Wichmann-Hill Random Number Generator and the Birthday Problem
Dear all,
Recently I am generating large random samples (10M) and any duplicated
numbers are not desired.
We tried several RNGs in R and found Wichmann-Hill did not produce
duplications.
The duplication problem is the interesting birthday problem. If there are
M possible numbers, randomly draw N numbers from them,
the average number of dupilcations D = N(N-1)/2/M.
For Knuth-TAOCP and
2019 Feb 26
2
bias issue in sample() (PR 17494)
Gabe
As mentioned on Twitter, I think the following behavior should be fixed
as part of the upcoming changes:
R.version.string
## [1] "R Under development (unstable) (2019-02-25 r76160)"
.Machine$double.digits
## [1] 53
set.seed(123)
RNGkind()
## [1] "Mersenne-Twister" "Inversion"??????? "Rejection"
length(table(runif(1e6)))
## [1] 999863
I don't
2019 Feb 26
1
bias issue in sample() (PR 17494)
Ralf
I don't doubt this is expected with the current implementation, I doubt
the implementation is desirable. Suggesting to turn this to
pbirthday(1e6, classes = 2^53)
## [1] 5.550956e-05
(which is still non-zero, but much less likely to cause confusion.)
Best regards
Kirill
On 26.02.19 10:18, Ralf Stubner wrote:
> Kirill,
>
> I think some level of collision is actually
2019 Feb 19
2
bias issue in sample() (PR 17494)
Before the next release we really should to sort out the bias issue in
sample() reported by Ottoboni and Stark in
https://www.stat.berkeley.edu/~stark/Preprints/r-random-issues.pdf and
filed aa a bug report by Duncan Murdoch at
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17494.
Here are two examples of bad behavior through current R-devel:
set.seed(123)
m <- (2/5) * 2^32
2008 Aug 19
1
RNGkind() state (PR#12567)
I sent this to R-devel early last month, but have received no response, so I guess it
really is a bug.
This looks like a bug to me, and is a bit hard to describe, but easy to reproduce. ?
Basically, if RNGkind is saved as something other than the default, and if the first
operation in a session is a set.seed(), the default is reverted to. ?Reproduce by:
cafe-rozo> ?R --vanilla
R version
2016 Aug 31
1
A bug in the R Mersenne Twister (RNG) code?
On 30 August 2016 at 18:29, Duncan Murdoch wrote:
| I don't see evidence of a bug. There have been several versions of the
| MT; we may be using a different version than you are. Ours is the
| 1999/10/28 version; the web page you cite uses one from 2002.
|
| Perhaps the newer version fixes some problems, and then it would be
| worth considering a change. But changing the default RNG
2017 Nov 03
5
Extreme bunching of random values from runif with Mersenne-Twister seed
This is cross-posted from SO (https://stackoverflow.com/q/47079702/1414455),
but I now feel that this needs someone from R-Devel to help understand why
this is happening.
We are facing a weird situation in our code when using R's [`runif`][1] and
setting seed with `set.seed` with the `kind = NULL` option (which resolves,
unless I am mistaken, to `kind = "default"`; the default being
2003 Jan 28
5
random number generator?
Dear R-Aficionados:
I realize that no random number generator is perfect, so what I report
below may be a result of that simple fact. However, if I have made an
error in my thinking I would greatly appreciate being corrected.
I wish to illustrate the behavior of small samples (n=10) and so
generate 100,000 of them.
n.samples <- 1000000
sample.size = 10
p <- 0.0001
z.normal <- qnorm(p)
2017 Nov 03
1
Extreme bunching of random values from runif with Mersenne-Twister seed
Martin,
Thanks for the helpful reply. Alas I had forgotten that (implied)
unfavorable comparisons of *nix systems with Windows systems would likely
draw irate (but always substantive) responses on the R-devel list -- poor
phrasing on my part. :)
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