Skip to content

add dictionary as an exported data frame #266

@avallecam

Description

@avallecam

hi @Karim-Mane doing a final review of the package, thought about if there is any rationale to not have the test dictionary as an exported object in the package?

library(magrittr)

# packages can export data sets
cfr::ebola1976 %>% tibble::as_tibble()
#> # A tibble: 73 × 3
#>    date       cases deaths
#>    <date>     <int>  <int>
#>  1 1976-08-25     1      0
#>  2 1976-08-26     0      0
#>  3 1976-08-27     0      0
#>  4 1976-08-28     0      0
#>  5 1976-08-29     0      0
#>  6 1976-08-30     0      0
#>  7 1976-08-31     0      0
#>  8 1976-09-01     1      0
#>  9 1976-09-02     1      0
#> 10 1976-09-03     1      0
#> # ℹ 63 more rows

# why not do the same for the sample dictionary in {cleanepi}
dictionary <- readRDS(
  system.file("extdata", "test_dict.RDS", package = "cleanepi")
)

dictionary
#>   options values    grp orders
#> 1       1   male gender      1
#> 2       2 female gender      2
#> 3       M   male gender      3
#> 4       F female gender      4
#> 5       m   male gender      5
#> 6       f female gender      6

Created on 2025-10-16 with reprex v2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions