[Rd] Suggestion: User defined sampling

2023-09-24 Thread Ralf Stubner
Hi everybody, Currently one can alter R's random number generation via RNGkind() in three aspects: the RNG itself, the method for drawing from the normal distribution and the method for generating integers within a range. For the first and second aspect it is possible to supply user defined method

Re: [Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!

2020-01-14 Thread Ralf Stubner
On Wed, Jan 15, 2020 at 5:45 AM Abby Spurdle wrote: > ...however, there's another problem. > > From the dependencies: > R-java x86_64 3.6.2-1.fc31 updates 10 k > R-java-devel x86_64 3.6.2-1.fc31 updates 9.9 k > java-1.8.0-openjdk x86_64 1:1.

[Rd] Integration with exchanged and infinite limits

2019-07-11 Thread Ralf Stubner
Dear List, while working on an update to my post on integrating over an infinite range using RcppNumerical [1] I have encountered erroneous behavior from integrate() when (at least) one of the limits is infinite and upper and lower limit are exchanged, i.e. upper < lower. For example, integrating

Re: [Rd] openblas

2019-05-08 Thread Ralf Stubner
act, there's > a specific package, openblas-Rblas, that provides libRblas.so. AFAIK a single-threaded OpenBLAS is used. When compiling R from source on a CentOS system I have used the configure option '--with-blas="-lopenblasp"' to link with the pthread version of OpenBLAS.

Re: [Rd] read.table() fails with https in R 3.6 but not in R 3.5

2019-05-06 Thread Ralf Stubner
tion is to adjust that value which does solve the issue: > options(HTTPUserAgent='mozilla') > read.table("https://www.dwds.de/r/stat?corpus=kern&cnt=tokens&date=decade&format=text";, header=TRUE) Dekade Anzahl 11900 11467254 2 1910 13023370 31

[Rd] Status of R_unif_index

2019-03-22 Thread Ralf Stubner
ackage? Thanks Ralf [1] https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Random-numbers -- Ralf Stubner Senior Software Engineer / Trainer daqana GmbH Dortustraße 48 14467 Potsdam T: +49 331 23 61 93 11 F: +49 331 23 61 93 90 M: +49 162 20 91 196 Mail: ralf.stub...@daqana.com Sitz: P

[Rd] Surprising results from INTEGER_GET_REGION with ALTREP object

2019-03-01 Thread Ralf Stubner
t not for "longer" vectors: > .Call("integer_get_region", 1:1e10, 0L, 10L) [1] 0 1072693248 0 1073741824 0 1074266112 [7] 0 1074790400 0 1075052544 Am I doing something wrong or is this a bug? I am using > R.version.string [1]

Re: [Rd] bias issue in sample() (PR 17494)

2019-02-26 Thread Ralf Stubner
nough I'd get that right. >>> >>> Best, >>> >>> luke >>> >>> >>> -- >>> Luke Tierney >>> Ralph E. Wareham Professor of Mathematical Sciences >>> University of Iowa  Phone: 319-335-3386 >>

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Ralf Stubner
> all.equal(opt$par, xhat, tol=0) # good: 5.53 e-7 [1] "Mean relative difference: 3.266165e-07" > all.equal(opt$objective, f(xhat), tol=0) # good: 1.8 e-12 [1] "Mean relative difference: 6.722005e-13" > abs( opt$objective - f(xhat) ) < 1e-4 ## Must be TRUE [1] TR

Re: [Rd] Dealing with .git folder when using R CMD INSTALL

2018-12-06 Thread Ralf Stubner
problems. What do you observe? cheerio ralf -- Ralf Stubner Senior Software Engineer / Trainer daqana GmbH Dortustraße 48 14467 Potsdam T: +49 331 23 61 93 11 F: +49 331 23 61 93 90 M: +49 162 20 91 196 Mail: ralf.stub...@daqana.com Sitz: Potsdam Register: AG Potsdam HRB 27966 Ust.-IdNr.: DE3000

Re: [Rd] Bias in R's random integers?

2018-09-27 Thread Ralf Stubner
On 9/21/18 3:15 PM, Ralf Stubner wrote: > Right, the RNGs in R produce no more than 32bits, so the conversion to a > double can be reverted. If we ignore those RNGs that produce less than > 32bits for the moment, then the attached file contains a sample > implementation (without

Re: [Rd] Bias in R's random integers?

2018-09-21 Thread Ralf Stubner
ere is an error in vseq.c when the numbers are read in: tmp = strtoul(buf, NULL, 16); The third argument to strtoul is the base in which the numbers should be interpreted. However, R has written numbers with base 10. Those can be interpreted as base 16, but they will mean something diffe

Re: [Rd] Bias in R's random integers?

2018-09-21 Thread Ralf Stubner
On 9/20/18 5:15 PM, Duncan Murdoch wrote: > On 20/09/2018 6:59 AM, Ralf Stubner wrote: >> It is difficult to do this in a package, since R does not provide access >> to the random bits generated by the RNG. Only a float in (0,1) is >> available via unif_rand(). > &

Re: [Rd] Bias in R's random integers?

2018-09-20 Thread Ralf Stubner
quite bad compared to R's algorithm with hashing. cheerio ralf [1] via http://www.pcg-random.org/posts/bounded-rands.html [2] https://github.com/daqana/dqrng/tree/feature/sample -- Ralf Stubner Senior Software Engineer / Trainer daqana GmbH Dortustraße 48 14467 Potsdam T: +49 331 23 61 93 11

Re: [Rd] Environments and parallel processing

2018-09-12 Thread Ralf Stubner
On 12.09.2018 20:20, Gábor Csárdi wrote: > This is all normal, a fork cluster works with processes, that do not > share memory. And if you are after shared-memory parallelism, you can try the 'Rdsm' package: https://cran.r-project.org/package=Rdsm Greetings Ralf -- Ralf Stubner

Re: [Rd] readLines function with R >= 3.5.0

2018-05-29 Thread Ralf Stubner
an create a user for me. Greetings Ralf PS: I get an error message from https://bugs.r-project.org/bugzilla3/. -- Ralf Stubner Senior Software Engineer / Trainer daqana GmbH Dortustraße 48 14467 Potsdam T: +49 331 23 61 93 11 F: +49 331 23 61 93 90 M: +49 162 20 91 196 Mail: ralf.stub...@daqan

Re: [Rd] readLines function with R >= 3.5.0

2018-05-28 Thread Ralf Stubner
u additionally (the [Enter], i.e., EOL) you also >> > "send" an EOF -- in Unix alikes via -D From my point of view this is a reasonable workaround for now. Thanks Ralf -- Ralf Stubner Senior Software Engineer / Trainer daqana GmbH Dortustraße 48 14467 Potsdam T: +4

[Rd] readLines function with R >= 3.5.0

2018-05-25 Thread Ralf Stubner
es not continue after inputing a number. All these tests where done using docker images from the rocker project, i.e. effectively using Debian Linux. Is this an error in the script or in R? Thanks Ralf -- Ralf Stubner Senior Software Engineer / Trainer daqana GmbH Dortustraße 48 14467 Potsdam