clone: Cloning ff and ram objects

Description Usage Arguments Details Value Author(s) See Also Examples

Description

clone physically duplicates objects and can additionally change some features, e.g. length.

Usage

1
2
3
4
5
6
clone(x, ...)
## S3 method for class 'list'
clone(x, ...)
## Default S3 method:
clone(x, ...)
still.identical(x, y)

Arguments

x

x

y

y

...

further arguments to the generic

Details

clone is generic. clone.default currently only handles atomics. clone.list recursively clones list elements. still.identical returns TRUE if the two atomic arguments still point to the same memory.

Value

an object that is a deep copy of x

Author(s)

Jens Oehlschlägel

See Also

clone.ff

Examples

1
2
3
4
5
6
7
8
  x <- 1:12
  y <- x
  still.identical(x,y)
  y[1] <- y[1]
  still.identical(x,y)
  y <- clone(x)
  still.identical(x,y)
  rm(x,y); gc()

OHDSI/bit documentation built on May 7, 2019, 8:30 p.m.