2024-10-25 08:35:55 +02:00
|
|
|
[{"path":"https://agdamsbo.github.io/stRoke/articles/toolbox.html","id":"a-toolbox","dir":"Articles","previous_headings":"","what":"A toolbox","title":"Toolbox","text":"toolbox small workshop mix old, worn, well proven tools newcomers. package seen something like . tried collect tools functions packages use regularly addition functions written fill use cases, able find solutions elsewhere.","code":""},{"path":"https://agdamsbo.github.io/stRoke/articles/toolbox.html","id":"cpr-intro","dir":"Articles","previous_headings":"A toolbox","what":"CPR manipulations","title":"Toolbox","text":"Note , handled, CPR numbers (social security numbers) handled care considered highly sensitive data. CPR number structured DDMMYY-XXXX, 1st X designating decade birth, last X designate binary gender (biological sex) dependent even/uneven female/male, last digits used modulus calculation verify validity CPR number. Foreigners unidentified persons given temporary CPR numbers including letters. information can found cpr.dk. Note, CPR numbers used examples publicly known non-organic.","code":""},{"path":"https://agdamsbo.github.io/stRoke/articles/toolbox.html","id":"age_calc","dir":"Articles","previous_headings":"A toolbox > CPR manipulations","what":"age_calc()","title":"Toolbox","text":"age_calc() function created learning exercise functions similarly lubridate::time_length().","code":"(age <- age_calc(as.Date(\"1945-10-23\"), as.Date(\"2018-09-30\"))) #> [1] 72.93699 trunc(age) #> [1] 72"},{"path":"https://agdamsbo.github.io/stRoke/articles/toolbox.html","id":"cpr_check","dir":"Articles","previous_headings":"A toolbox > CPR manipulations","what":"cpr_check()","title":"Toolbox","text":"Checks validity CPR numbers according modulus 11 rule. Note due limitations possible available CPR numbers, rule apply CPR numbers 2007. Including CPR numbers letters gives warning NA, can checked modulus 11 function. used care, see message.","code":"cpr_check( c( \"2310450637\", \"010190-2000\", \"010115-4000\", \"300450-1030\", \"010150-4021\", \"010150-4AA1\" ) ) #> OBS: as per 2007 not all valid CPR numbers apply to modulus 11 rule. #> #> See the vignette 'Toolbox' #> Warning in matrix(as.numeric(unlist(strsplit(cpr_short, \"\"))), nrow = 10): NAs #> introduced by coercion #> [1] TRUE FALSE FALSE FALSE FALSE NA"},{"path":"https://agdamsbo.github.io/stRoke/articles/toolbox.html","id":"cpr_dob","dir":"Articles","previous_headings":"A toolbox > CPR manipulations","what":"cpr_dob()","title":"Toolbox","text":"Extracts date birth (DOB) CPR number. Accounts decade birth. See earlier.","code":"cpr_dob(c( \"2310450637\", \"010190-2000\", \"010115-4000\", \"300450-1030\", \"010150-4021\" )) #> [1] \"23-10-1945\" \"01-01-1990\" \"01-01-2015\" \"30-04-1950\" \"01-01-1950\""},{"path":"https://agdamsbo.github.io/stRoke/articles/toolbox.html","id":"cpr_female","dir":"Articles","previous_headings":"A toolbox > CPR manipulations","what":"cpr_female()","title":"Toolbox","text":"Gives logical vector whether female gender last digit CPR.","code":"table(cpr_female(stRoke::cprs[, 1])) #> #> FALSE TRUE #> 98 102"},{"path":[]},{"path":"https://agdamsbo.github.io/stRoke/articles/toolbox.html","id":"ci_plot","dir":"Articles","previous_headings":"A toolbox > Plotting","what":"ci_plot()","title":"Toolbox","text":"Plots odds ratios 95 % confidence intervals. Performs binary logistic regression outcome factors two (2) levels ordinal logistic regression outcome factors two levels. Mind relevant assumptions. Outputs ggplot element manipulation.","code":"data(talos) talos[, \"mrs_1\"] <- factor(talos[, \"mrs_1\"], ordered = TRUE) ci_plot( ds = talos, x = \"rtreat\", y = \"mrs_1\", vars = c(\"hypertension\", \"diabetes\") ) #> Waiting for profiling to be done..."},{"path":"https://agdamsbo.github.io/stRoke/articles/toolbox.html","id":"generic_stroke","dir":"Articles","previous_headings":"A toolbox > Plotting","what":"generic_stroke()","title":"Toolbox","text":"learning purposes. Uses anonymized data TALOS trial output Table 1 (gt
|