Description Usage Arguments Details Value See Also Examples
Get elements from a list file.
1 |
file |
Name of file. |
index |
|
If no indices provided, the whole list will be read. Given index could be a numeric (integer)
vector, a logical vector or a character vector representing the names. If there exist more then one elements
corresponding to a given name, the first matched will be returned (not necessary to be the first
one in index order). If there are no elements with given name, NULL
will be returned.
Files created by saveRDS
can't be read.
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))
.
A list object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | list_1 <- list("A" = c(1,2), "B" = "abc", list(1, 2, 3))
saveList(object = list_1, file = "example.llo")
# read the whole list
readList(file = "example.llo")
# by numeric indices
readList(file = "example.llo", index = c(1, 3))
# by names
readList(file = "example.llo", index = c("A", "B"))
# by logical indices
readList(file = "example.llo", index = c(TRUE, FALSE, TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.