> Davis Vaughan
> on Tue, 16 Feb 2021 14:50:33 -0500 writes:
> 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 s
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
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] "
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
Hi all,
I believe that the internal row names object created at this line in
`row_names_gets()` should be using `-n`, not `n`.
https://github.com/wch/r-source/blob/b30641d3f58703bbeafee101f983b6b263b7f27d/src/main/attrib.c#L71
This can currently generate corrupt internal row names when using
`att