Create Data Dictionary from Existing Data
Value
A data dictionary object
Details
variable labels stored in the 'label' attribute are incorporated in the resulting dictionary.
Examples
attr(iris$Species, 'label') <- "Flower species"
as_data_dictionary(iris)
#> Data Dictionary:
#> # A tibble: 5 × 8
#> name type label description units divby_modeling category_levels
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 Sepal.Length Numeric none none none none none
#> 2 Sepal.Width Numeric none none none none none
#> 3 Petal.Length Numeric none none none none none
#> 4 Petal.Width Numeric none none none none none
#> 5 Species Nominal Flower … none none none setosa, versic…
#> # ℹ 1 more variable: category_labels <chr>
