Skip to content

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

@jangorecki

Description

@jangorecki

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions