• This is the first version of hfmisc.
  • Changed default to UTDATUM = FALSE in prep_sosdata. The index date will therefore be compared with INDATUM.
  • Added optional parameter, allowedcenslimit, were possible to specify limit were an outcome is still considered. This is to ensure that patients that are discharged AFTER date of death are still counted as an event, should only have inpact if UTDATUM = TRUE.
  • Added optional parameter valsclass with option to output the comorb/outcome as a character or factor variable.
  • Added function create_deathvar and dataset dors_data
  • Trim trailing whitespace for variables DIA_all, OP_all, ekod_all, ORSAK_all in prep_sosdata
  • Trim all extra whitespaces for variables DIA_all, OP_all, ekod_all, ORSAK_all in prep_sosdata
  • [] not shown in metaout for create_sosvar
  • added restriction that death cannot occur after censdate in create_deathvar
  • [] not shown in metaout for create_deathvar
  • added option (noof = TRUE) that calculates number of comorbs/outcomes
  • update to R v 4
  • sos_outtime_xx is calculated in accordance with starttime and stoptime
  • added function read_sasdata
  • capital letter for Yes/No in create_sosvar/create_deathvar
  • optional names for dia, op, ekod variables in prep_sosdata
  • fix bug renaming HDIA/ULORSAK if remove = FALSE in prep_sosdata
  • added imputation of DODSDAT in prep_sosdata
  • added option to negate strings to search for in create_sosvar
  • added functions default_kable (default kable table from kableExtra) and fn (format numbers)
  • added option to calculate duration of comorbidity (comduration) in function create_sosvar
  • fixed bug when calculating noof events with stoptime and unique id variable
  • fixed bug when calculating noof events and valsclass != “num”
  • added option pequalsign to fn function and made possible to have digits != 3 if p = TRUE
  • added functions create_crevent, create_crvar, cut_surv
  • bug fix in create_sosvar valsclass = “fac”
  • added argument forcenum + warning to create_crvar
  • added function create_medvar
  • added text conversions to create_crvar
  • changed default name to create lm vars in create_medvar