Description Usage Arguments Details See Also Examples
Overload of operator []<-.
1 2 | ## S3 replacement method for class 'largeList'
x[index = NULL] <- value
|
x |
A largeList object created by |
index |
|
value |
|
It behaviours the same as a normal list object. If index
is not provided, elements in
value will be appended to the list file. If value
is NULL
, elements with given indices
will be removed.
1 2 3 4 5 6 7 8 | largelist_object <- getList("example.llo", truncate = TRUE)
largelist_object[] <- list("A" = 1, "B" = 2) ## append list to the list file
largelist_object[] <- list("C" = 3, "D" = 4) ## append list to the list file
largelist_object[1] <- NULL ## remove first element
largelist_object["B"] <- NULL ## remove element with name "B"
largelist_object[c("C","D")] <- c(5, 6) ## change value
largelist_object[2] <- 5 ## change value
largelist_object[c(4, 5)] <- list(6, 7) ## append 6, 7 to 4th, 5th position and NULL to 3rd position
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.