[Rd] issue with print()ing multibyte characters on R 4.0.4

2021-02-16 Thread Hiroaki Yutani
Hi all, I saw several people on Japanese locale claim that, on R 4.0.4, print() doesn't display Japanese characters correctly. This seems to happen only on Windows and on macOS (I usually use Linux and I don't see this problem). For example, in the result below, "鬼" and "外" are displayed in "\uXX

[Rd] NCOL, as.matrix, cbind and NULL

2021-02-16 Thread Gabriel Becker
Hi all, so I've known for a while that NROW(NULL) gives 0, where nrow(NULL) gives an error, so I naively expected NCOL to do the same. Of course, it does not, and is documented* (more on this in a bit) as not doing so. For those reading without the documentation open, it gives 1. The relevant do

Re: [Rd] Corrupt internal row names when creating a data.frame with `attributes<-`

2021-02-16 Thread Davis Vaughan
This originally came up in this dplyr issue: https://github.com/tidyverse/dplyr/issues/5745 Where `tibble::column_to_rownames()` failed because it eventually checks `.row_names_info(.data) > 0L` to see if there are automatic row names, which is in line with the documentation that Kevin pointed out

Re: [Rd] Corrupt internal row names when creating a data.frame with `attributes<-`

2021-02-16 Thread Bill Dunlap
as.matrix.data.frame does not take the absolute value of that number: > dPos <- structure(list(X=101:103,201:203),class="data.frame",row.names=c(NA_integer_,+3L)) > dNeg <- structure(list(X=101:103,201:203),class="data.frame",row.names=c(NA_integer_,-3L)) > rownames(as.matrix(dPos)) [1] "

Re: [Rd] Corrupt internal row names when creating a data.frame with `attributes<-`

2021-02-16 Thread Kevin Ushey
Strictly speaking, I don't think this is a "corrupt" representation, given that any APIs used to access that internal representation will call abs() on the row count encoded within. At least, as far as I can tell, there aren't any adverse downstream effects from having the row names attribute encod

Re: [Rd] issue with data()

2021-02-16 Thread Michael Dewey
Dear Terry Option 2 looks the best to me. They have a relatively simple change to make and there are only four of them. Michael On 16/02/2021 14:39, Therneau, Terry M., Ph.D. via R-devel wrote: I am testing out the next release of survival, which involves running R CMD check on 868 CRAN pac

[Rd] issue with data()

2021-02-16 Thread Therneau, Terry M., Ph.D. via R-devel
I am testing out the next release of survival, which involves running R CMD check on 868 CRAN packages that import, depend or suggest it. The survival package has a lot of data sets, most of which are non-trivial real examples (something I'm proud of).  To save space I've bundled many of them,