View source: R/mixedcirc_tss_calculation.R
shallow | R Documentation |
data.table
Convenience function to shallow copy a data.table
(until this function is exported in the data.table
package). For
internal use only.
shallow(x, cols = names(x), reset_class = FALSE)
x |
A |
cols |
Character vector of column names (from |
reset_class |
logical (default |
A shallow copied data.table
.
## Not run:
# For internal use only
library(data.table)
x <- data.table(a=1:2, b=3:4)
setattr(x, 'class', c("tmp", class(x)))
y <- gread:::shallow(x) # only copies column pointers
class(y) # class(x) is retained
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.