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
Closed

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

jangorecki opened this issue Jun 10, 2019 · 0 comments
Assignees
Milestone

Comments

@jangorecki
Copy link
Member

@jangorecki jangorecki commented Jun 10, 2019

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.
@jangorecki jangorecki self-assigned this Jun 10, 2019
jangorecki added a commit that referenced this issue Jun 10, 2019
@mattdowle mattdowle added this to the 1.12.4 milestone Jun 12, 2019
mattdowle added a commit that referenced this issue Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.