Lookup datasets
datasets.Rmd
All the previous dataets in the shiny app can be
accessed with the get_seg_data()
function. For a full list
of datasets in the seg-shiny-data/Data
repo, use the data = names
argument:
get_seg_data(data = "names")
#> [1] "VanderbiltComplete" "AppRiskPairData" "RiskPairData"
#> [4] "AppLookUpRiskCat" "LookUpRiskCat" "AppTestData"
#> [7] "AppTestDataSmall" "AppTestDataMed" "AppTestDataBig"
#> [10] "FullSampleData" "ModBAData" "No_Interference_Dogs"
#> [13] "SEGRiskTable" "SampMeasData" "SampleData"
#> [16] "lkpRiskGrade" "lkpSEGRiskCat4"
AppLookUpRiskCat
vs. LookUpRiskCat
There are two LookUpRiskCat
datasets in the data GitHub
repo, below I’ll compare their contents.
x <- get_seg_data("AppLookUpRiskCat")
y <- get_seg_data("LookUpRiskCat")
waldo::compare(
x = names(x),
y = names(y)
)
#> `old[2:3]`: "ABSLB" "ABSUB"
#> `new`: "RiskCat" "ABSLB" "ABSUB" "RiskCatRangeTxt" "RiskCatLabel"
waldo::compare(
x = x$risk_cat,
y = y$RiskCat
)
#> ✔ No differences
waldo::compare(
x = x$ABSLB,
y = y$ABSLB
)
#> ✔ No differences
waldo::compare(
x = x$ABSUB,
y = y$ABSUB
)
#> ✔ No differences
LookUpRiskCat
has two additional columns, but otherwise
the risk_cat
, ABSLB
, and ABSUB
are all identical.
AppRiskPairData
vs RiskPairData
The risk pairs data also have two versions
(AppRiskPairData
and RiskPairData
):
x <- get_seg_data("AppRiskPairData")
y <- get_seg_data("RiskPairData")
waldo::compare(
x = names(x),
y = names(y)
)
#> `old`: "RiskPairID" "REF" "BGM" "RiskFactor" "abs_risk"
#> `new[2:4]`: "RefVal" "MeasVal" "RiskFactor"
waldo::compare(
x = x$REF,
y = y$RefVal
)
#> ✔ No differences
waldo::compare(
x = x$BGM,
y = y$MeasVal
)
#> ✔ No differences
waldo::compare(
x = x$RiskFactor,
y = y$RiskFactor
)
#> ✔ No differences
AppRiskPairData
and RiskPairData
have three
identical columns: REF
/RefVal
,
BGM
/MeasVal
, and RiskFactor
.
AppRiskPairData
has two additional columns
(RiskPairID
and abs_risk
).