Re: [Rd] Possible Bug: file.exists() Function. Due to UTF-8 Encoding differences on Windows between R 4.0.1 and R 3.6.3?

2020-06-23 Thread Yihui Xie
Hi Tomas, Sorry for the false alarm! I did some further testing, and you were right. There was no regression. I suspected it was a regression because the user who reported the issue said his code worked in R 3.6 but not 4.0. I should have tested it more carefully by myself. After I tested it again

Re: [Rd] Restrict package to load-only access - prevent attempts to attach it

2020-06-23 Thread Abby Spurdle
You could go one step down, print a note or a warning. Also, you could combine different approaches: Check for an (additional) environment variable. If set, print a note, if not set, generate a warning (or an error). That would prevent someone accidently attaching your package, and would discoura

Re: [Rd] Restrict package to load-only access - prevent attempts to attach it

2020-06-23 Thread Duncan Murdoch
On 23/06/2020 4:21 p.m., Henrik Bengtsson wrote: Hi, I'm developing a package whose API is only meant to be used in other packages via imports or pkg::foo(). There should be no need to attach this package so that its API appears on the search() path. As a maintainer, I want to avoid having it a

[Rd] Restrict package to load-only access - prevent attempts to attach it

2020-06-23 Thread Henrik Bengtsson
Hi, I'm developing a package whose API is only meant to be used in other packages via imports or pkg::foo(). There should be no need to attach this package so that its API appears on the search() path. As a maintainer, I want to avoid having it appear in search() conflicts by mistake. This means

Re: [Rd] subset data.frame at C level

2020-06-23 Thread Jim Hester
It looks to me like internally .subset2 uses `get1index()`, but this function is declared in Defn.h, which AFAIK is not part of the exported R API. Looking at the code for `get1index()` it looks like it just loops over the (translated) names, so I guess I just do that [0]. [0]: https://github.co

Re: [Rd] [R] R 4.0.2 is released

2020-06-23 Thread Hasan Diwan
Congrats! -- H [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R-ints context documentation

2020-06-23 Thread Tomas Kalibera
Thanks for spotting this outdated bit in the documentation. Updated now in R-devel. The byte-code compiler does additional optimizations - the contexts are not included when not needed, and source references/expressions are tracked in a different way. That is documented in the compiler document

Re: [Rd] base::order breaking change in R-devel

2020-06-23 Thread Tomas Kalibera
This can be narrowed down to Sys.setlocale("LC_CTYPE","C") x2 <- "\u00e7" x1 <- iconv(x2, from="UTF-8", to="latin1") x1 < x2 # FALSE or NA In R 4.0 it returns NA, in R-devel it returns FALSE (when running in CP1252 locale on Windows). It is the same character, only the encoding is different,