Re: [Rd] Build a R call at C level

2020-06-30 Thread Morgan Morgan
Sorry Dirk, I don't remember discussing this topic or alternatives with you at all. Have a nice day. On Tue, 30 Jun 2020, 14:42 Morgan Morgan, wrote: > Thanks Jan and Tomas for the feedback. > Answer from Jan is what I am looking for. > Maybe I am not looking in the right place buy it is not eas

Re: [Rd] `basename` and `dirname` change the encoding to "UTF-8"

2020-06-30 Thread Johannes Rauh
Hello, everyone, thank you for your quick and helpful responses and the detailed information. Sorry for not providing a reproducible example for the (potential) bug in `tools::makeLazyLoadDB`. The main point of my mail was the surprising behaviour of `basename` and `dirname`. Fixing those fun

Re: [Rd] Build a R call at C level

2020-06-30 Thread Dirk Eddelbuettel
On 30 June 2020 at 14:42, Morgan Morgan wrote: | Thanks Jan and Tomas for the feedback. | Answer from Jan is what I am looking for. | Maybe I am not looking in the right place buy it is not easy to understand | how these LCONS, CONS, SETCDR...etc works. a) There are alternatives, and if memory s

Re: [Rd] Build a R call at C level

2020-06-30 Thread Morgan Morgan
Thanks Jan and Tomas for the feedback. Answer from Jan is what I am looking for. Maybe I am not looking in the right place buy it is not easy to understand how these LCONS, CONS, SETCDR...etc works. Thank you Best regards Morgan On Tue, 30 Jun 2020, 12:36 Tomas Kalibera, wrote: > On 6/30/20 1

Re: [Rd] [External] Re: R-devel internal errors during check produce?

2020-06-30 Thread luke-tierney
Thanks. Fixed in R-devel in r78754. This was related to a fix for PR#17809, not the change to unique.default. Best, luke On Tue, 30 Jun 2020, Jan Gorecki wrote: No packages are being loaded, or even installed. Did you try running the example on R-devel built with flags I have provided in this

Re: [Rd] Build a R call at C level

2020-06-30 Thread Tomas Kalibera
On 6/30/20 1:06 PM, Jan Gorecki wrote: It is quite known that R documentation on R C api could be improved... Please see "5.11 Evaluating R expressions from C" from "Writing R Extensions" Best Tomas Still R-package-devel mailing list should be preferred for this kind of questions. Not sure

Re: [Rd] Build a R call at C level

2020-06-30 Thread Jan Gorecki
It is quite known that R documentation on R C api could be improved... Still R-package-devel mailing list should be preferred for this kind of questions. Not sure if that is the best way, but works. call_to_sum <- inline::cfunction( language = "C", sig = c(x = "SEXP"), body = " SEXP e = PROTE

Re: [Rd] R-devel internal errors during check produce?

2020-06-30 Thread Martin Maechler
> Jan Gorecki > on Tue, 30 Jun 2020 11:29:24 +0100 writes: > No packages are being loaded, or even installed. > Did you try running the example on R-devel built with flags I have > provided in this email? > I checked now and it is required to use --enable-strict-barri

Re: [Rd] R-devel internal errors during check produce?

2020-06-30 Thread Jan Gorecki
No packages are being loaded, or even installed. Did you try running the example on R-devel built with flags I have provided in this email? I checked now and it is required to use --enable-strict-barrier to reproduce the issue. On Tue, Jun 30, 2020 at 9:02 AM Martin Maechler wrote: > > > Kurt

Re: [Rd] R-devel internal errors during check produce?

2020-06-30 Thread Deepayan Sarkar
On Tue, Jun 30, 2020 at 1:32 PM Martin Maechler wrote: > > > Kurt Hornik > > on Tue, 30 Jun 2020 06:20:57 +0200 writes: > > > Jan Gorecki writes: > >> Thank you both, You are absolutely correct that example > >> should be minimal, so here it is. > > >> l = list(a=new.en

[Rd] Build a R call at C level

2020-06-30 Thread Morgan Morgan
Hi All, I was reading the R extension manual section 5.11 ( Evaluating R expression from C) and I tried to build a simple call to the sum function. Please see below. call_to_sum <- inline::cfunction( language = "C", sig = c(x = "SEXP"), body = " SEXP e = PROTECT(lang2(install(\"sum\"), x));

Re: [Rd] R-devel internal errors during check produce?

2020-06-30 Thread Martin Maechler
> Kurt Hornik > on Tue, 30 Jun 2020 06:20:57 +0200 writes: > Jan Gorecki writes: >> Thank you both, You are absolutely correct that example >> should be minimal, so here it is. >> l = list(a=new.env(), b=new.env()) unique(l) >> Just for completeness, env_list dur

Re: [Rd] `basename` and `dirname` change the encoding to "UTF-8"

2020-06-30 Thread Tomas Kalibera
On 6/29/20 4:39 PM, Johannes Rauh wrote: Dear R Developers, I noticed that `basename` and `dirname` always return "UTF-8" on Windows (tested with R-4.0.0 and R-3.6.3): p <- "Föö/Bär" Encoding(p) [1] "latin1" Encoding(dirname(p)) [1] "UTF-8" Encoding(basename(p)) [1] "UTF-8" Is this on p