You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* extend c, cbind, and rbind
* consistent use of Rboolean (#251)
* R consistent integer division and modulo operation (#250)
* r consistent integer division
* tweak NEWS
---------
Co-authored-by: Michael Chirico <chiricom@google.com>
* fix test ancient
* add origin for as.{Date,POSIXct,POSIXlt} for ancient
* `stringsAsFactors=FALSE` for ancient
* fix ancient
* skip a test for ancient
* fix cbind tests for ancient
* skip cbind tests for ancient
* skip rbind tests for ancient
* fix target_class_and_sample_value for missing .bit64.suppressPromoteInteger64ToCharacterMessage
* merge target_class_and_sample_value in target_class
* touch-ups to c()
* touch-ups to rbind,cbind
* missing ')'
* inherits() instead of class()
Co-authored-by: Michael Chirico <chiricom@google.com>
* remove eval(str2lang())
* another round of touch-up
* vestigial ')'
* missing '{'
* simplify (?) replacement helper for cbind
* more expect_same_error
* switch branch order
* fix updated logical condition for unnested branches
* revert unrelated switch to expect_same_error
* replace rbind helper too
* fix helper argument name
Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>
* refactoring, add comments, add news
* extract replace_dimnames
* tweak NEWS
* fix deparse.level problems
* skip ancient test
* more canonical patrick (avoid expand.grid), don't test 4
* raw cases
* missing symmetric cases for difftime, factor, ordered
* explicitly ignore coercion warning before error
---------
Co-authored-by: Michael Chirico <chiricom@google.com>
Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>
Copy file name to clipboardExpand all lines: NEWS.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@
8
8
9
9
All of these have observed downstream calls directly. If the call is in a CRAN/Bioconductor package, I'll be reaching out to help migrate onto the generic. This will probably take at least a year, so don't expect this to induce a CRAN release _per se_ until 2027 (although you should certainly aim to slip this in to your next release in the meantime).
10
10
11
+
1. When integer64 and character are combined, the result will be character. This prevents loss of information, e.g. in `c(as.integer64(1L), "a")` and `c(as.integer64(1L), "999999999999999999999999")`. To try this in advance for `c.integer64`, `cbind.integer64`, `rbind.integer64`, `[.integer64<-`, `[[.integer64<-`, `union`, `intersect`, `setdiff`, `setdiff` and `is.element` one can set the option `bit64.promoteInteger64ToCharacter=TRUE`.
12
+
11
13
## BREAKING CHANGES
12
14
13
15
1. {bit64} no longer `Depends` on {bit}; instead it `Imports` it. Please file an issue if this
@@ -58,6 +60,7 @@
58
60
1. A replacement in an integer64 vector or array using `[<-` or `[[<-` with a complex or POSIXct leads to an R consistent coercion of the integer64 object to a complex or POSIXct object and not just an error. Thanks @hcirellu.
59
61
1.`union`, `setdiff`, `intersect`, `setequal` and `is.element` get an overload to work correctly with `integer64` (#182).
60
62
1. The methods of the 'Ops' group (e.g. `+`, `&`, `==`) now support dispatch for both arguments so that e.g. `difftime * integer64` works consistent to R (#179). Thanks @hcirellu. Note that this relies on `chooseOpsMethod()` and thus R 4.3.0.
63
+
1.`c.integer64`, `cbind.integer64` and `rbind.integer64` now support combining with lists and recursion as `base::c`, `base::cbind` and `base::rbind` do (#252). In addition, by setting the option `bit64.promoteInteger64ToCharacter=TRUE` the methods return character if integer64 and character are combined. Thanks @hcirellu.
# function to determine target class and sample value for union, intersect, setdiff, setequal, min, max, range, sum, prod, c, cbind and rbind functions
89
-
target_class=function(x) {
89
+
getClassesOfElements=function(x, recursive) {
90
+
classes= vapply(x, function(el) if (inherits(el, c("list", "data.frame"))) "list"else class(el)[1L], character(1L))
if ("POSIXlt"%in%classes&& isTRUE(POSIXltAsCharacter)) return("character")
93
103
if ("complex"%in%classes) return("complex")
94
104
if (any(c("character", "factor", "ordered") %in%classes)) {
95
105
# TODO(#44): next Release: change default behavior; subsequent Release: change from message to warning; subsequent Release: change from warning to error; subsequent Release: remove option
0 commit comments