Pretty much as it says, let's save a base R factor to an on-disk representation.

# S4 method for class 'factor'
saveObject(x, path, ...)

Arguments

x

A factor.

path

String containing the path to a directory in which to save x.

...

Further arguments that are ignored.

Value

x is saved inside path. NULL is invisibly returned.

See also

readBaseFactor, to read the files back into the session.

Author

Aaron Lun

Examples

tmp <- tempfile()
saveObject(factor(1:10, 1:30), tmp)
list.files(tmp, recursive=TRUE)
#> [1] "OBJECT"      "contents.h5"