Displaying 20 results from an estimated 400 matches similar to: "Surprising results from INTEGER_GET_REGION with ALTREP object"
2020 Sep 13
1
[External] Thread-safe R functions
Jiefei,
Beyond the general response that Luke gave, to be a bit more specific to
what you said, DATAPTR and INTEGER_GET_REGION involve ALTREP method
execution (for ALTREP objects, obviously) so even they are not as simple
and straightforward as they were a couple years ago. They should not (any
longer) be thought of as being guaranteed to be essentially bare metal data
retrieval from memory.
2020 Sep 13
2
Thread-safe R functions
Hi,
I am curious about whether there exist thread-safe functions in
`Rinternals.h`. I know that R is single-threaded designed, but for the
simple and straightforward functions like `DATAPTR` and `INTEGER_GET_REGION`,
are these functions safe to call in a multi-thread environment?
Best,
Jiefei
[[alternative HTML version deleted]]
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 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 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 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,
2019 Mar 22
1
Status of R_unif_index
Dear List,
section "6.3 Random number generation" of WRE [1] lists unif_rand(),
norm_rand() and exp_rand() as the interface to R's RNG. Now
R_ext/Random.h also has
double R_unif_index(double);
Can this be also treated as an official API function that may be called
from a package?
Thanks
Ralf
[1]
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Random-numbers
--
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 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
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
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 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
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 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",
>>>
2019 May 13
0
read.table() fails with https in R 3.6 but not in R 3.5
On 5/6/19 2:27 PM, Stephen Berman wrote:
> 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:
>>>
>>>>
2005 Jan 31
2
type of list elements in .Call
Dear People,
Here is something I do not understand. Consider
*************************************************
foo.cc
*************************************************
#include <iostream>
#include <R.h>
#include <Rinternals.h>
using std::cout;
using std::endl;
extern "C"
{
SEXP printlst(SEXP lst);
}
SEXP printlst(SEXP lst)
{
for(int i=0; i<length(lst);