modifyNameInList {largeList}R Documentation

Modify names of elements in a list file.

Description

Modify names of elements in a list file.

Usage

modifyNameInList(file, index, name)

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

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"))


[Package largeList version 0.3.1 Index]