clone.ffdf | R Documentation |
clone physically duplicates ffdf objects
## S3 method for class 'ffdf' clone(x, nrow=NULL, ...)
x |
an |
nrow |
optionally the desired number of rows in the new object. Currently this works only together with |
... |
further arguments passed to |
Creates a deep copy of an ffdf object by cloning all physical
components including the row.names
An object of type ffdf
Jens Oehlschlägel
clone
, ffdf
x <- as.ffdf(data.frame(a=1:26, b=letters, stringsAsFactors = TRUE)) message("Here we change the content of both x and y by reference") y <- x x$a[1] <- -1 y$a[1] message("Here we change the content only of x because y is a deep copy") y <- clone(x) x$a[2] <- -2 y$a[2] rm(x, y); gc()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.