Re: [Rd] Possible `substr` bug in UTF-8 Corner Case

2018-03-29 Thread Tomas Kalibera
Thanks, fixed in R-devel (by checking validity of UTF-8 strings for substr/substring). Tomas On 03/29/2018 03:53 AM, brodie gaslam via R-devel wrote: I think there is a memory bug in `substr` that is triggered by a UTF-8 corner case: an incomplete UTF-8 byte sequence at the end of a string.  W

Re: [Rd] as.pairlist does not convert call objects

2018-03-29 Thread Tomas Kalibera
On 03/28/2018 08:31 AM, Jialin Ma wrote: Dear all, It seems that as.pairlist does not convert call objects, producing results like the following: is.pairlist(as.pairlist(quote(x + y))) [1] FALSE Should this behavior be expected? The documentation says that the behavior of as.pairlist is und

Re: [Rd] Possible `substr` bug in UTF-8 Corner Case

2018-03-29 Thread brodie gaslam via R-devel
Thank you for the quick response and for the quick fix (and for the rchk vagrant image I used to build and test the below!). One thing I'll note about the fix is that it may start breaking things that used to "work".  I think it is fair to say that character count is not well defined with illega

Re: [Rd] Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism

2018-03-29 Thread luke-tierney
Now also committed to the release branch. Best, luke On Tue, 27 Mar 2018, luke-tier...@uiowa.edu wrote: I have committed a change to R-devel that addresses this. To be on the safe side I need to run some more extensive tests before deciding if this can be ported to the release branch for R 3.

Re: [Rd] Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism

2018-03-29 Thread luke-tierney
Now also committed to the release branch. Best, luke On Tue, 27 Mar 2018, luke-tier...@uiowa.edu wrote: I have committed a change to R-devel that addresses this. To be on the safe side I need to run some more extensive tests before deciding if this can be ported to the release branch for R 3.

[Rd] Base R examples that write to current working directory

2018-03-29 Thread Hadley Wickham
Hi all, Given the recent CRAN push to prevent examples writing to the working directory, is there any interest in fixing base R examples that write to the working directory? A few candidates are the graphics devices, file.create(), writeBin(), writeChar(), write(), and saveRDS(). I'm sure there ar

Re: [Rd] Base R examples that write to current working directory

2018-03-29 Thread Duncan Murdoch
On 29/03/2018 5:23 PM, Hadley Wickham wrote: Hi all, Given the recent CRAN push to prevent examples writing to the working directory, is there any interest in fixing base R examples that write to the working directory? A few candidates are the graphics devices, file.create(), writeBin(), writeCh

Re: [Rd] Nice names in deparse

2018-03-29 Thread Suharto Anggono Suharto Anggono via R-devel
I am raising this again. As as.character(list(c(one = "1"))) is still "1" in R 3.5.0 alpha, could as.character(list(c(one = 1))) be "1" , too, as before? The case here is the list component is atomic with length 1. On Sat, 16/12/17, Suharto Anggono Su