The goal of tomleditR is to expose the toml_edit crate to R.
You can install the development version of tomleditR from GitHub with:
# install.packages("devtools")
devtools::install_github("extendr/tomleditR")
This is a basic example which shows you how to solve a common problem:
tomleditR::inspect("")
#> [1] "Document {"
#> [2] " root: Table("
#> [3] " Table {"
#> [4] " decor: Decor {"
#> [5] " prefix: \"default\","
#> [6] " suffix: \"default\","
#> [7] " },"
#> [8] " implicit: false,"
#> [9] " dotted: false,"
#> [10] " doc_position: None,"
#> [11] " span: None,"
#> [12] " items: {},"
#> [13] " },"
#> [14] " ),"
#> [15] " trailing: empty,"
#> [16] " original: Some("
#> [17] " \"\","
#> [18] " ),"
#> [19] " span: None,"
#> [20] "}"
Or you can take a peek at a specific value:
tomleditR::get_value("[package]\nname = \"tomleditR\"\nversion = \"0.0.0\"\n", c("package", "version"))
#> [1] "0.0.0"