| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## other-attach-order #7848 +/- ##
===================================================
Coverage 99.01% 99.01%
===================================================
Files 88 88
Lines 17286 17286
===================================================
Hits 17116 17116
Misses 170 170 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
|
Generated via commit a0baec7 Download link for the artifact containing the test results: ↓ atime-results.zip
|
Sorry, something went wrong.
|
changes look good to me.. this may be the fix on R's side: r-devel/r-svn@a786d1e |
Sorry, something went wrong.
|
Great spot! I find that on R 4.1.3: But not R 4.2.0: |
Sorry, something went wrong.
|
Since nchar(allowNA = TRUE) mistakenly signals an error instead of returning NA, we could also use diff --git a/R/print.data.table.R b/R/print.data.table.R
index e602f80d6..817e49420 100644
--- a/R/print.data.table.R
+++ b/R/print.data.table.R
@@ -256,7 +256,7 @@ char.trunc = function(x, trunc.char = getOption("datatable.prettyprint.char")) {
if (is.null(trunc.char)) return(x)
trunc.char = max(0L, suppressWarnings(as.integer(trunc.char[1L])), na.rm=TRUE)
if (!is.character(x) || trunc.char <= 0L) return(x)
- nchar_width = nchar(x, 'width', allowNA = TRUE)
+ nchar_width = tryCatch(nchar(x, 'width', allowNA = TRUE), error = function(...) NA)
nchar_chars = nchar(x, 'char', allowNA = TRUE)
is_full_width = nchar_width > nchar_chars
is_full_width[is.na(is_full_width)] = FALSEand let the rest of the code handle the NA like it currently does on R ≥ 4.2. |
Sorry, something went wrong.
|
Great suggestion! Added the NEWS now |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
See e.g.
h/t @joshhwuu for identifying the culprit R bugfix in the comment below.