Repository navigation
clarify error when rbindlist(l) is not a list() - #3638
Conversation
hi, in the code below, users hit [this error message](https://github.com/Rdatatable/data.table/blob/2619f1a594fa1e2967c11fb3339522f240e2afa0/src/rbindlist.c#L31) that says `data.table` and `data.frame` objects are OK when they're actually not.. thanks for the amazing software! library(data.table) # correct error message rbindlist( list( 1 ) ) # Error in rbindlist(x) : # Item 1 of input is not a data.frame, data.table or list # confusing error message, since item 1 is a data.frame rbindlist( mtcars ) # Error in rbindlist(x) : # Item 1 of input is not a data.frame, data.table or list class(mtcars) # [1] "data.frame" x <- data.table( mtcars ) # confusing error message, since item 1 is a data.table rbindlist( x ) # Error in rbindlist(x) : # Item 1 of input is not a data.frame, data.table or list class( x ) # [1] "data.table" "data.frame" # works as expected rbindlist( list( mtcars ) ) rbindlist( list( x ) )
jangorecki
left a comment
There was a problem hiding this comment.
Thanks for PR, I left comment how to fix failure of test 682
Codecov Report
@@ Coverage Diff @@
## master #3638 +/- ##
==========================================
- Coverage 98.19% 98.18% -0.01%
==========================================
Files 66 66
Lines 12923 12925 +2
==========================================
+ Hits 12690 12691 +1
- Misses 233 234 +1
Continue to review full report at Codecov.
|
|
Looks like code there are not unit test for error message added in this PR, could you add one? |
unit test added #3638 (comment)
|
@jangorecki hi, i hope d064de2 works? thanks again |
|
Great. Thanks @ajdamico. I've invited you to be project member so that next time you can create a branch directly in the main project. This makes it easier to work on each other's branches. You'll need to accept the invitation before it is applied (I think it's a notification in the top right of GitHub). Thanks again and welcome! |
|
This was a code contribution, so I'm sorry @ajdamico, I should have added you to DESCRIPTION as a contributor at the time. I'll correct my mistake now in a commit to master linking to this PR. |
|
we use this software every day. thank you!! |
hi, in the code below, users hit this error message that says
data.tableanddata.frameobjects are OK when they're actually not.. thanks for the amazing software!