You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (is.data.table(x)) return(as.data.table.data.table(x)) # S3 is weird, #6739. Also # nocov; this is tested in 2302.{2,3}, not sure why it doesn't show up in coverage.
218
-
if (!identical(class(x), "data.frame")) return(as.data.table(as.data.frame(x)))
217
+
if (is.data.table(x)) return(as.data.table.data.table(x,keep.rownames=keep.rownames, key=key, ...)) # S3 is weird, #6739. Also # nocov; this is tested in 2302.{2,3}, not sure why it doesn't show up in coverage.
218
+
if (!identical(class(x), "data.frame")) return(as.data.table(as.data.frame(x), keep.rownames=keep.rownames, key=key, ...))
219
219
if (!isFALSE(keep.rownames)) {
220
220
# can specify col name to keep.rownames, #575; if it's the same as key,
221
221
# kludge it to 'rn' since we only apply the new name afterwards, #4468
222
222
if (is.character(keep.rownames) && identical(keep.rownames, key)) key='rn'
0 commit comments