show the path to a matchmaker example file

matchmaker_example(name = NULL)

Arguments

name

the name of a matchmaker example file

Value

a path to a matchmaker example file

Examples

matchmaker_example() # list all of the example files
#> [1] "coded-data.csv" "spelling-dictionary.csv"
# read in example spelling dictionary sd <- matchmaker_example("spelling-dictionary.csv") read.csv(sd, stringsAsFactors = FALSE)
#> options values grp orders #> 1 y Yes readmission 1 #> 2 n No readmission 2 #> 3 u Unknown readmission 3 #> 4 .missing Missing readmission 4 #> 5 0 Yes treated 1 #> 6 1 No treated 2 #> 7 .missing Missing treated 3 #> 8 1 Facility 1 facility 1 #> 9 2 Facility 2 facility 2 #> 10 3 Facility 3 facility 3 #> 11 4 Facility 4 facility 4 #> 12 5 Facility 5 facility 5 #> 13 6 Facility 6 facility 6 #> 14 7 Facility 7 facility 7 #> 15 8 Facility 8 facility 8 #> 16 9 Facility 9 facility 9 #> 17 10 Facility 10 facility 10 #> 18 .default Unknown facility 11 #> 19 0 0-9 age_group 1 #> 20 10 10-19 age_group 2 #> 21 20 20-29 age_group 3 #> 22 30 30-39 age_group 4 #> 23 40 40-49 age_group 5 #> 24 50 50+ age_group 6 #> 25 high High .regex ^lab_result_ 1 #> 26 norm Normal .regex ^lab_result_ 2 #> 27 inc Inconclusive .regex ^lab_result_ 3 #> 28 y yes .global Inf #> 29 n no .global Inf #> 30 u unknown .global Inf #> 31 unk unknown .global Inf #> 32 oui yes .global Inf #> 33 .missing missing .global Inf
# read in example coded data coded_data <- matchmaker_example("coded-data.csv") coded_data <- read.csv(coded_data, stringsAsFactors = FALSE) str(coded_data)
#> 'data.frame': 50 obs. of 11 variables: #> $ id : chr "ef267c" "e80a37" "b72883" "c9ee86" ... #> $ date : chr "2019-07-08" "2019-07-07" "2019-07-07" "2019-07-09" ... #> $ readmission : chr NA "y" "y" "n" ... #> $ treated : int 0 0 1 1 1 NA NA 0 1 1 ... #> $ facility : chr "C" "3" "8" "4" ... #> $ age_group : int 10 10 30 40 0 50 40 0 50 50 ... #> $ lab_result_01: chr "unk" "inc" "inc" "inc" ... #> $ lab_result_02: chr "high" "unk" "norm" "inc" ... #> $ lab_result_03: chr "inc" "norm" "inc" "unk" ... #> $ has_symptoms : chr NA "y" "" "y" ... #> $ followup : chr "u" "oui" "oui" "oui" ...
coded_data$date <- as.Date(coded_data$date)