Skip to contents

View the contents of a toml file as a dataframe

Usage

view_toml(toml_path)

Arguments

toml_path

Path to the toml file

Value

a dataframe of the toml file contents.

Examples

tmp <- fs::dir_create(fs::file_temp())
strata::build_quick_strata_project(tmp, 2, 3)
proj_tomls <- survey_tomls(tmp)
purrr::map(proj_tomls, view_toml)
#> $`/tmp/RtmpRK1XGV/file163d3f1d7ebb/strata/.strata.toml`
#> # A tibble: 2 × 4
#>   type   name      order created   
#>   <chr>  <chr>     <int> <date>    
#> 1 strata stratum_1     1 2024-11-27
#> 2 strata stratum_2     2 2024-11-27
#> 
#> $`/tmp/RtmpRK1XGV/file163d3f1d7ebb/strata/stratum_1/.laminae.toml`
#> # A tibble: 3 × 5
#>   type    name        order skip_if_fail created   
#>   <chr>   <chr>       <int> <lgl>        <date>    
#> 1 laminae s1_lamina_1     1 FALSE        2024-11-27
#> 2 laminae s1_lamina_2     2 FALSE        2024-11-27
#> 3 laminae s1_lamina_3     3 FALSE        2024-11-27
#> 
#> $`/tmp/RtmpRK1XGV/file163d3f1d7ebb/strata/stratum_2/.laminae.toml`
#> # A tibble: 3 × 5
#>   type    name        order skip_if_fail created   
#>   <chr>   <chr>       <int> <lgl>        <date>    
#> 1 laminae s2_lamina_1     1 FALSE        2024-11-27
#> 2 laminae s2_lamina_2     2 FALSE        2024-11-27
#> 3 laminae s2_lamina_3     3 FALSE        2024-11-27
#> 
fs::dir_delete(tmp)