-
Notifications
You must be signed in to change notification settings - Fork 979
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
[Request] Allow NULL columns in data.table() #2305
Milestone
Comments
franknarf1
changed the title
[Request] Allow NULL data.table columns in data.table()
[Request] Allow NULL columns in data.table()
Aug 16, 2017
Yep: data.table's should not have NULL columns. Every column needs to have a type. |
mattdowle
added a commit
that referenced
this issue
Mar 20, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This could be either a question or a request. The question would be: "Are NULL columns allowed in a data.table?" The request:
I was looking at #2303 and noticed this error:
It would arguably be nice for
data.table()
to allow the construction of a table like this.as.data.table.list
allows it with no error:NULL
is idiomatic as a column value for grouped operations and (mostly)rbindlist
:And finally, the "wildcard" behavior of
NULL
in grouped operations andrbindlist
is built upon in packages like vetr (see the "alike" vignette):I may be overlooking some arguments against it. The main ones that come to mind are:
NULL
column by reference.NULL
columns aren't a thing (?).If it's decided that data.tables shouldn't have
NULL
columns (which would also be fine), then I guessas.data.table.list(x)
may need to change to throw an error; or to drop theNULL
elements ofx
even whenmax(lengths(x)) == 0
.The text was updated successfully, but these errors were encountered: