Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

clone.ffdf

Cloning ffdf objects


Description

clone physically duplicates ffdf objects

Usage

## S3 method for class 'ffdf'
clone(x, nrow=NULL, ...)

Arguments

x

an ffdf

nrow

optionally the desired number of rows in the new object. Currently this works only together with initdata=NULL

...

further arguments passed to clone (usually not usefull)

Details

Creates a deep copy of an ffdf object by cloning all physical components including the row.names

Value

An object of type ffdf

Author(s)

Jens Oehlschlägel

See Also

Examples

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()

ff

Memory-Efficient Storage of Large Data on Disk and Fast Access Functions

v4.0.4
GPL-2 | GPL-3 | file LICENSE
Authors
Daniel Adler [aut], Christian Gläser [aut], Oleg Nenadic [aut], Jens Oehlschlägel [aut, cre], Martijn Schuemie [aut], Walter Zucchini [aut]
Initial release
2020-10-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.