remove_items | R Documentation |
remove_items()
removes one or more items from the TOML document.
Alternatively, insert_items()
inserts key value pairs into the TOML
document.
remove_items(x, keys)
insert_items(x, ..., df_as_array = TRUE)
get_item(x, key)
x |
an object of class |
keys |
a character vector of key names to remove. Cannot contain missing values. |
... |
named items to be serialized to TOML. |
df_as_array |
default |
key |
a character vector of key values. The keys are used recursively. For example with |
an object of class Toml
x <- toml(
date = list(
full = as.Date("2025-02-07"),
parts = list(year = 2015L, month = "February", day = 7L)
),
season = "winter"
)
# fetch the date table
get_item(x, "date")
# fetch the month value
get_item(x, c("date", "parts", "month"))
# remove an item based on name
remove_items(x, "season")
# add multiple items
insert_items(x, temperature = 31, cloudy = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.