-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let print.data.table return invisible(x) #2807
Let print.data.table return invisible(x) #2807
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2807 +/- ##
=======================================
Coverage 93.49% 93.49%
=======================================
Files 61 61
Lines 12368 12368
=======================================
Hits 11563 11563
Misses 805 805
Continue to review full report at Codecov.
|
Remove extra parentheses in my previous PR Rdatatable#2804
if i'm not mistaken (i may well be) the thinking behind not doing this in the first place is that always returning (e.g.) a 7GB |
Good point. But an object seems not to be copied until it is modified (in a normal way). Maybe only a pointer/reference to the original object is returned by
|
There's no speed or memory penalty to returning Well, it passes tests, which includes auto-printing ( Does it pass |
^ as matt was writing i was running a quick benchmark to convince myself there's no speed penalty; confirmed on a 15GB Can't see why it would fail on |
I like this change, as there is no speed penalty we should definitely go for consistency with data.frame. R 3.1.0 build runs for branches in our repo (as gitlab only mirrors our repo, not forks). Once merged I will take a look at master if it pass. |
print.data.table
should invisibly return its first argument instead ofNULL
. It is compatible with the standardprint.data.frame
and tibble'sprint.tbl_df
, and supports pipe-style coding:I would be happy to add a bullet on the NEWS if this PR is accepted. Maybe NOTES section? Thanks.