saveList: Save or append elements to a list file.

Description Usage Arguments Details Value See Also Examples

View source: R/Exports.R

Description

Save or append elements to a list file.

Usage

1
saveList(object, file, append = FALSE, compress = TRUE)

Arguments

object

A list object to save or append.

file

Name of file.

append

TRUE/FALSE, TRUE refers to truncating and saving. FALSE refers to appending.

compress

TRUE/FALSE, using compression or not.

Details

Save or append a list (with or without names) to a file. Notice that, all names will be truncated to 16 characters. Rest attributes of lists will be discarded.
Files generated by this function are not readable by readRDS.
When it takes long time to process, some verbose info will be printed to console, which can be switched off by setting options(list(largeList.report.progress = FALSE)).

Value

invisible TRUE if no error occurs.

See Also

largeList

Examples

1
2
3
4
5
6
7
list_1 <- list("A" = c(1,2), "B" = "abc", list(1, 2, 3))

# save list_1 to file using compression.
saveList(object = list_1, file = "example.llo", append = FALSE, compress = TRUE)

# append list_1 to file, compress option will be extracted from the file.
saveList(object = list_1, file = "example.llo", append = TRUE)

largeList documentation built on May 1, 2019, 10:55 p.m.