R/01-utils.R
madshapR_examples.Rd
Example datasets and data dictionaries, and taxonomy, to provide illustrative examples of objects used by madshapR.
madshapR_examples
list
A list with 9 elements (data frames and lists) providing example objects for testing the package:
Dataset for example dataset
Data dictionary for example dataset where the structure is a data dictionary
Data dictionary for example dataset where the structure is a data dictionary compliant with Maelstrom
Dataset of example with errors with example data dictionary
Data Dictionary for example dataset with errors with example dataset
Data dictionary for example dataset with errors
Data dictionary for example with collapsed categories
Taxonomy for example dataset
Dataset example summary
{
library(dplyr)
head(madshapR_examples$`dataset_example`)
glimpse(madshapR_examples$`data_dictionary_example`)
}
#> List of 2
#> $ Variables : tibble [9 × 8] (S3: tbl_df/tbl/data.frame)
#> ..$ index : num [1:9] 1 2 3 4 5 6 7 8 9
#> ..$ name : chr [1:9] "part_id" "gndr" "height" "weight_ms" ...
#> ..$ label:en : chr [1:9] "id of the participant" "gndr" "height" "weight_ms" ...
#> ..$ description:en : chr [1:9] "id of the participant" "gender of the participant" "height of the participant" "weight of the participant - measured" ...
#> ..$ valueType : chr [1:9] "text" "integer" "integer" "integer" ...
#> ..$ unit : chr [1:9] NA NA "cm" "kg" ...
#> ..$ datacollection::type : chr [1:9] "automatic" "declared" "declared" "measured" ...
#> ..$ datacollection::level: chr [1:9] "high" "high" "moderate" "moderate" ...
#> $ Categories: tibble [11 × 4] (S3: tbl_df/tbl/data.frame)
#> ..$ variable: chr [1:11] "gndr" "gndr" "gndr" "weight_ms" ...
#> ..$ name : chr [1:11] "1" "2" "-77" "-88" ...
#> ..$ label:en: chr [1:11] "Male" "Female" "Don’t want to answer" "Don’t want to answer" ...
#> ..$ missing : logi [1:11] FALSE FALSE TRUE TRUE TRUE FALSE ...