modifyNameInList {largeList} | R Documentation |
Modify names of elements in a list file.
modifyNameInList(file, index, name)
file |
Name of file. |
index |
A numeric or logical vector. |
name |
A character vector consisting replacement names. |
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.
invisible TRUE
if no error occurs.
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"))