Learn R Programming

RecordLinkage (version 0.3-2)

clone: Serialization of record linkage object.

Description

Saving, loading and deep copying of record linkage objects for big data sets.

Usage

clone(object, ...)
  saveRLObject(object, file = getDbFile(object), ...)
  loadRLObject(file, inPlace = FALSE)

Arguments

object
Object of class "RLBigData". The object to save.
file
The name of the file to save to or load from.
inPlace
Logical. Wether to use the exisiting file as working copy. See details.
...
Optional arguments for possible additions, currently not used.

Value

  • clone returns a deep copy of object. loadRLObject returns the loaded object. saveRLObject is used for its side effects.

Side effects

clone creates a new temporary SQLite database (a copy of the one belonging to object). saveRLObject writes to the specified file. loadRLObject creates a new temporary SQLite database in the case inPlace = FALSE.

Details

As the classes for record linkage of large data sets have a SQLite database attached which holds data and generates comparison patterns, a deep copy of an instance is not possible by the standard R mechanisms. Also, saving and reloading in a different R session makes an object unusable because the database connection is lost. These issues are overcome by these functions. clone makes a deep copy of an object by duplicating the underlying database. saveRLObject saves an object to a SQLite database file containing a representation of the R object as well as the associated database tables. By default the current working copy is used. loadRLObject loads an object from a file saved by saveRLObject. clone and saveRLObject are generic functions with methods for "RLBigData" and "RLResult". If loadRLObject is called with inPlace = FALSE (the default), a working copy of the database is made in a temporary file and the original file left untouched. Calling with inPlace = TRUE sets the provided file as working copy and changes made to the database are persistent. This option is useful when working with large files in order to prevent disk usage overhead.

See Also

clone-methods, saveRLObject-methods