[Rd] Issue with data() function

2020-10-23 Thread Therneau, Terry M., Ph.D. via R-devel
I found an issue with the data() command this evening when working on the survival package. 1. I have a lot of data sets in the package, almost all used in at least one vignette, help file, or test.  As a space saving measure, I have bundled many of them together, i.e., the file data/cancer.r

[Rd] Change to I() in R 4.1

2020-10-23 Thread Pages, Herve
Hi there, Is that change in R-devel intentional? library(Matrix) m <- as(matrix(c(0, 1)), "sparseMatrix") isS4(m) # [1] TRUE x <- I(m) # Warning message: # In `class<-`(x, unique.default(c("AsIs", oldClass(x : # Setting class(x) to multiple strings ("AsIs", "dgCMat

Re: [Rd] sum() (and similar methods) should work for zero row data.frames

2020-10-23 Thread Pages, Herve
Hi, There are 2 bugs here. The proposed fix to Summary.data.frame() is fine but it doesn't address the other problem reported by the OP that as.matrix() on a zero-row data.frame doesn't respect the type of its columns, like other column-combining operations do: df <- data.frame(a=numeric(0)

Re: [Rd] The presence/absence of `zone` in POSIXlt depending on time zone as a cause of possible inconsistences?

2020-10-23 Thread Sebastian Meyer
Hi Iago, I think the unlist behaviour is expected. If the list contains a mixture of character and integer elements, the unlisted object will be a character vector, similar to what happens when you c()oncatenate components of different types (see the details in ?c for the hierarchy). If you only n

Re: [Rd] The presence/absence of `zone` in POSIXlt depending on time zone as a cause of possible inconsistences?

2020-10-23 Thread IAGO GINÉ VÁZQUEZ
​Hi again, I take advantage of my previous mail to ask you a question for which I was looking for an answer when detected the behaviour I previously told. In the help of DataTimeClasses one can read: "POSIXlt" objects will often have an attribute "tzone", a character vector of length 3 giving

[Rd] The presence/absence of `zone` in POSIXlt depending on time zone as a cause of possible inconsistences?

2020-10-23 Thread IAGO GINÉ VÁZQUEZ
Dear all, I have just detected what seems a minor inconsistence with data types. If one unlists a POSIXlt time with GMT zone gets a numeric vector, since the POSIXlt list has no `zone` element, while if one unlists a POSIXlt time with a non GMT zone (also non specifying tz if the Sys.timezone i

Re: [Rd] timezone tests and R-devel

2020-10-23 Thread Sebastian Meyer
Yes, you are absolutely right and I'm pretty sure this will be fixed in one way or another. IMO, the failing test should simply use all.equal.POSIXt's new argument check.tzone=FALSE. Two simple alternatives modifying all.equal.POSIXt behaviour: - make check.tzone=FALSE the default: this is incon

Re: [Rd] timezone tests and R-devel

2020-10-23 Thread Kasper Daniel Hansen
So let me try to raise this issue once more, and perhaps be more clear about what I think the issue is.. In my opinion there is now a bug in make check in R-development (tested today with r79361). As I see it, I specify a reasonable TZ environment variable and this leads to make check emitting a