Displaying 20 results from an estimated 600 matches similar to: "Status of R_unif_index"
2019 Feb 26
0
bias issue in sample() (PR 17494)
Kirill,
I think some level of collision is actually expected! R uses a 32bit MT
that can produce 2^32 different doubles. The probability for a collision
within a million draws is
> pbirthday(1e6, classes = 2^32)
[1] 1
Greetings
Ralf
On 26.02.19 07:06, Kirill M?ller wrote:
> Gabe
>
>
> As mentioned on Twitter, I think the following behavior should be fixed
> as part of the
2019 Mar 01
1
Surprising results from INTEGER_GET_REGION with ALTREP object
Dear Listmembers,
wanting to learn more about ALTREP I wrote the following function to
extract a subsequence from an integer vector:
#include <Rinternals.h>
SEXP integer_get_region(SEXP _x, SEXP _i, SEXP _n) {
int i = INTEGER(_i)[0];
int n = INTEGER(_n)[0];
SEXP result = PROTECT(Rf_allocVector(INTSXP, n));
INTEGER_GET_REGION(_x, i, n, INTEGER(result));
UNPROTECT(1);
return
2018 Dec 06
0
Dealing with .git folder when using R CMD INSTALL
On 06.12.18 15:19, Joris Meys wrote:
> I know this R CMD build ignores these files and folders by default, but R
> CMD INSTALL doesn't apparently.
to me this is not apparent. I just tried "R CMD INSTALL ." in a package
directory with a .git directory. This went without any problems. What do
you observe?
cheerio
ralf
--
Ralf Stubner
Senior Software Engineer / Trainer
daqana
2019 May 06
0
read.table() fails with https in R 3.6 but not in R 3.5
On 04.05.19 19:04, Stephen Berman wrote:
> In versions of R prior to 3.6.0 the following invocation succeeds,
> returning the data frame shown:
>
>> read.table("https://www.dwds.de/r/stat?corpus=kern&cnt=tokens&date=decade&format=text", header=TRUE)
> Dekade Anzahl
> 1 1900 11467254
> 2 1910 13023370
> 3 1920 13434601
> 4 1930
2019 May 08
0
openblas
On 08.05.19 09:34, I?aki Ucar wrote:
> On Wed, 8 May 2019 at 04:52, Peter Langfelder
> <peter.langfelder at gmail.com> wrote:
>>
>> (CCing the R-devel list, maybe someone will have a better answer.)
>>
>> To be honest, I don't know how to. I wasn't able to configure R to use
>> OpenBLAS using the configure script and options on my Linux Fedora
2002 Nov 24
1
unif_rand() and exp_rand()
Dear R-users:
Recently I found my simulation run into an apparently infinite loop.
After a few days of tracing and chasing, I believe it is caused by
the built-in unif_rand() and exp_rand() functions: unif_rand() can
produce a value of 0 which causes the following part of exp_rand()
running into an infinity loop
u = unif_rand();
for (;;) {
u += u;
if (u > 1.0)
break;
2018 Sep 21
1
Bias in R's random integers?
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().
>
> I believe it is safe to multiply the unif_rand() value by 2^32, and take
> the whole number part as an
2018 Sep 20
5
Bias in R's random integers?
On 9/20/18 1:43 AM, Carl Boettiger wrote:
> For a well-tested C algorithm, based on my reading of Lemire, the unbiased
> "algorithm 3" in https://arxiv.org/abs/1805.10941 is part already of the C
> standard library in OpenBSD and macOS (as arc4random_uniform), and in the
> GNU standard library. Lemire also provides C++ code in the appendix of his
> piece for both this and
2018 Sep 12
1
Environments and parallel processing
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
Senior Software Engineer / Trainer
daqana GmbH
Dortustra?e 48
14467 Potsdam
T: +49 331 23 61 93 11
F:
2018 May 29
2
readLines function with R >= 3.5.0
On 28.05.2018 16:38, Martin Maechler wrote:
> Then, I now do think this needs to be dealt with as a bug
> (but I'm not delving into fixing it!)
Ok. Can somebody with write privileges in bugzilla add the bug report? I
can also do this myself, if somebody with the required privileges can
create a user for me.
Greetings
Ralf
PS: I get an error message from
2018 May 28
0
readLines function with R >= 3.5.0
>>>>> Ralf Stubner
>>>>> on Fri, 25 May 2018 19:18:58 +0200 writes:
> Dear all, I would like to draw you attention to this
> question on SO:
> https://stackoverflow.com/questions/50372043/readlines-function-with-new-version-of-r
> Based on the OP's code I used the script
> #######################################
>
2018 May 28
0
readLines function with R >= 3.5.0
>>>>> Ralf Stubner
>>>>> on Mon, 28 May 2018 12:13:57 +0200 writes:
> On 28.05.2018 11:07, G?bor Cs?rdi wrote:
>> stdin() is not the same as file("stdin"), see the note in ?stdin.
Of course it is not the same, otherwise using one for the other
had no effect, but you are right:
it is *NOT* a solution to the problem
> In
2018 May 29
0
readLines function with R >= 3.5.0
>>>>> Ralf Stubner
>>>>> on Tue, 29 May 2018 11:21:28 +0200 writes:
> On 28.05.2018 16:38, Martin Maechler wrote:
>> Then, I now do think this needs to be dealt with as a bug
>> (but I'm not delving into fixing it!)
> Ok. Can somebody with write privileges in bugzilla add the
> bug report? I can also do this myself,
2018 May 25
2
readLines function with R >= 3.5.0
Dear all,
I would like to draw you attention to this question on SO:
https://stackoverflow.com/questions/50372043/readlines-function-with-new-version-of-r
Based on the OP's code I used the script
#######################################
create_matrix <- function() {
cat("Write the numbers of vertices: ")
user_input <- readLines("stdin", n=1)
user_input <-
2018 Sep 21
0
Bias in R's random integers?
On 9/21/18 6:38 PM, Tierney, Luke wrote:
> Not sure what should happen theoretically for the code in vseq.c, but
> I see the same pattern with the R generators I tried (default,
> Super-Duper, and L'Ecuyer) and with with bash $RANDOM using
>
> N <- 10000
> X1 <- replicate(N, as.integer(system("bash -c 'echo $RANDOM'", intern = TRUE)))
> X2 <-
2018 May 28
5
readLines function with R >= 3.5.0
On 28.05.2018 11:07, G?bor Cs?rdi wrote:
> stdin() is not the same as file("stdin"), see the note in ?stdin.
In particular stdin() works in an interactive session but not when R -f
/ Rscript is used, since it does not wait for the user to input anything:
$ R -f readLines.R
R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Copyright (C) 2018 The R Foundation for Statistical
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
2018 Sep 20
0
Bias in R's random integers?
On 20/09/2018 6:59 AM, Ralf Stubner wrote:
> On 9/20/18 1:43 AM, Carl Boettiger wrote:
>> For a well-tested C algorithm, based on my reading of Lemire, the unbiased
>> "algorithm 3" in https://arxiv.org/abs/1805.10941 is part already of the C
>> standard library in OpenBSD and macOS (as arc4random_uniform), and in the
>> GNU standard library. Lemire also
2010 Jan 28
1
Problem with R math library.
Hello.
I've been working on my OCaml-R binding, and I quite pleased to see that
it is functional, though far from being perfect or polished. You can
find the gitweb webpage and the interface documentation at
http://yziquel.homelinux.org/gitweb/?p=ocaml-r.git;a=tree
http://yziquel.homelinux.org/topos/api/ocaml-r/index.html
I'm having unexpected trouble with the math library, though.
2019 May 06
2
read.table() fails with https in R 3.6 but not in R 3.5
On Mon, 6 May 2019 11:12:25 +0200 Ralf Stubner <ralf.stubner at daqana.com> wrote:
> On 04.05.19 19:04, Stephen Berman wrote:
>> In versions of R prior to 3.6.0 the following invocation succeeds,
>> returning the data frame shown:
>>
>>> read.table("https://www.dwds.de/r/stat?corpus=kern&cnt=tokens&date=decade&format=text",
>>>