Skip to content
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

as.data.table array method should handle some NULL dimnames #3636

Closed
jangorecki opened this issue Jun 10, 2019 · 0 comments · Fixed by #3637
Closed

as.data.table array method should handle some NULL dimnames #3636

jangorecki opened this issue Jun 10, 2019 · 0 comments · Fixed by #3637
Assignees
Milestone

Comments

@jangorecki
Copy link
Member

Now if dimnames is NULL then it is handled, but there might be some of dimnames NULL

a = array(1:8, dim=c(2L,2L,2L), dimnames=list(NULL, NULL, as.character(1:2)))
d = as.data.table(a)
#Error in data.table(do.call(CJ, c(val, sorted = FALSE)), N = as.vector(x)) : 
#  Item 1 has no length. Provide at least one item (such as NA, NA_integer_ etc) to be repeated to match the 8 rows in the longest column. Or, all columns can be 0 length, for insert()ing rows into.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants