modifyNameInList: Modify names of elements in a list file.

Description Usage Arguments Details Value See Also Examples

View source: R/Exports.R

Description

Modify names of elements in a list file.

Usage

1

Arguments

file

Name of file.

index

A numeric or logical vector.

name

A character vector consisting replacement names.

Details

Modify names of elements with given indices by replacement values provided in parameter name. If the length of replacement values is shorter than the length of indices, values will be used circularly.

Value

invisible TRUE if no error occurs.

See Also

largeList

Examples

1
2
3
4
5
6
7
8
list_1 <- list("A" = c(1,2), "B" = "abc", list(1, 2, 3))
saveList(object = list_1, file = "example.llo")

# by numeric indices
modifyNameInList(file = "example.llo", index = c(1,2), name = c("AA","BB"))

# by logical indices
modifyNameInList(file = "example.llo", index = c(TRUE, TRUE, FALSE), name = c("AA","BB"))

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