Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Dec 20, 2023
1 parent d27d963 commit cfb24ac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -2842,6 +2842,7 @@ setDT = function(x, keep.rownames=FALSE, key=NULL, check.names=FALSE) {
}
# check no matrix-like columns, #3760. Other than a single list(matrix) is unambiguous and depended on by some revdeps, #3581
if (length(x)>1L) {
# for some reason, this can't be cols_with_dims(x), or test 510 will break (no longer emit an .internal.selfref warning). this should be investigated.
idx = vapply_1i(x, function(xi) length(dim(xi)))>1L
if (any(idx))
warningf("Some columns are a multi-column type (such as a matrix column): %s. setDT will retain these columns as-is but subsequent operations like grouping and joining may fail. Please consider as.data.table() instead which will create a new column for each embedded column.", brackify(which(idx)))
Expand Down

0 comments on commit cfb24ac

Please sign in to comment.