Conversation
Codecov Report
@@ Coverage Diff @@
## master #4129 +/- ##
==========================================
+ Coverage 99.47% 99.60% +0.13%
==========================================
Files 75 72 -3
Lines 14808 13918 -890
==========================================
- Hits 14730 13863 -867
+ Misses 78 55 -23
Continue to review full report at Codecov.
|
|
|
||
| 5. `nafill` and `setnafill` gain `nan` argument to say whether `NaN` should be considered the same as `NA` for filling purposes, [#4020](https://github.com/Rdatatable/data.table/issues/4020). Prior versions had an implicit value of `nan=NaN`; the default is now `nan=NA`, i.e., `NaN` is treated as if it's missing. Thanks @AnonymousBoba for the suggestion. Also, while `nafill` still respects `getOption('datatable.verbose')`, the `verbose` argument has been removed. | ||
|
|
||
| 6. New convenience function `%plike%` which map the existing `like()` argument `perl`, [#3702](https://github.com/Rdatatable/data.table/issues/3702). `%plike%` uses Perl-compatible regular expression (PCRE) which extends on TRE and is more efficient. Thanks @KyleHaynes for the suggestion and PR. |
There was a problem hiding this comment.
If we're going to say "more efficient", it might help to either point to someone else's benchmark or add our own. I'm not sure it's widely known that perl=TRUE is faster (I certainly didn't).
PS I prefer to disambiguate -- memory efficient, or computationally efficient?
| # Don't use * or % like SQL's like. Uses regexpr syntax - more powerful. | ||
| # returns 'logical' so can be combined with other where clauses. | ||
| like = function(vector, pattern, ignore.case = FALSE, fixed = FALSE) { | ||
| like = function(vector, pattern, ignore.case = FALSE, fixed = FALSE, perl = FALSE) { |
There was a problem hiding this comment.
I don't think it's common enough to need another infix for it, but we might as well add useBytes as an argument too? Comes up occasionally when working with messy strings.
Or maybe even just change the signature to function(vector, pattern, ...) and pass it on, although grepl is more limited than grep...
|
Travis error is due to |
|
@KyleHaynes are you planning to work out this PR? |
|
@jangorecki, Sorry for the delay. I've updated to a point I'm happy with it. I note that the codecov/project isn't passing (not overly familiar with codecov) and not sure why (seems to reference some code commited by Matt quite some time ago)? |
|
@KyleHaynes yea don't worry about that Codecov bit. A line got uncovered when moving to R 4.1... you'll see all the other PRs failing for the same reason |
|
|
||
| 14. Added support for `round()` and `trunc()` to extend functionality of `ITime`. `round()` and `trunc()` can be used with argument units: "hours" or "minutes". Thanks to @JensPederM for the suggestion and PR. | ||
|
|
||
| 15. New convenience function `%plike%` which map the existing `like()` argument `perl`, [#3702](https://github.com/Rdatatable/data.table/issues/3702). `%plike%` uses Perl-compatible regular expression (PCRE) which extends on TRE and is computationally more efficient. Thanks @KyleHaynes for the suggestion and PR. |
There was a problem hiding this comment.
This makes it seem like it's unequivocally better, but I've definitely found cases where perl=TRUE is slower, e.g.:
|
Sorry for the very long delay here. |
|
Thanks @mattdowle (and @MichaelChirico); a small contribution, but thanks for accepting it! Keep up the good work on such an invaluable package! |
Added %plike%.
Closes #3702