Skip to content

Commit

Permalink
Shrink ws diff
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico authored Oct 1, 2024
1 parent db1a600 commit 21b33c8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions R/data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -2929,11 +2929,9 @@ setDT = function(x, keep.rownames=FALSE, key=NULL, check.names=FALSE) {
rn = if (!identical(keep.rownames, FALSE)) rownames(x) else NULL
setattr(x, "row.names", .set_row_names(nrow(x)))
if (check.names) setattr(x, "names", make.names(names(x), unique=TRUE))

# fix for #1078 and #1128, see .resetclass() for explanation.
setattr(x, "class", .resetclass(x, 'data.frame'))
setalloccol(x)

if (!is.null(rn)) {
nm = c(if (is.character(keep.rownames)) keep.rownames[1L] else "rn", names(x))
x[, (nm[1L]) := rn]
Expand Down

0 comments on commit 21b33c8

Please sign in to comment.