preventr 0.11.0
CRAN release: 2025-01-26
-
User-visible changes:
All changes specified for
estimate_risk()
also apply to its synonym,est_risk()
. There are no breaking changes, only enhancements.Users can now compare results with either the original Pooled Cohort Equations (PCEs) released by the ACC/AHA in 2013 or the revised PCEs released by Yadlowsky and colleagues in 2018. This is implemented via expanding the set of valid input options for the existing argument
model
within theestimate_risk()
function. The Shiny app has also been updated to permit estimation via the PCEs.Function arguments for
estimate_risk()
are now semantically categorized as one of the following: required predictor variable, optional predictor variable, optional behavior variable. This is to help with clarity of documentation and additional features in the package. Nothing has actually changed about which arguments are required or the behavior of those arguments.The function
estimate_risk()
gains the optional behavior argumentcollapse
, which allows users to collapse the list of tibbles into a single tibble when relevant. To maintain backwards compatibility, this is an opt-in feature, so the default ofcollapse
isFALSE
.The function
estimate_risk()
gains the optional behavior argumentsuse_dat
andadd_to_dat
, which allow users to pass a data frame (as a data.frame, tibble, or data.table) to the function to carry out risk estimation against a large set of data in one function call, with the option (viaadd_to_dat = TRUE
) to append the results to the data frame passed to the function. This is accompanied byvignette("using-data-frame")
, which gives many examples, and also shows how to use a data frame for input even if you do not want to useuse_dat
andadd_to_dat
.The function
estimate_risk()
gains the optional behavior argumentprogress
, which gives users the option to display a progress bar in the console whenuse_dat
is a data frame. This argument is independent ofquiet
.All the above changes also have corresponding documentation within the relevant function and corresponding sections of the documentation.
-
Internal changes:
Minor edits to
is_valid_*
functions (addingextra_text
arg)Addition of new
is_valid_*
functions in support of estimating with other modelsExpansion of verification for
is_okay_type()
stemming from expansion of functionality withuse_dat
andadd_to_dat
Minor refactoring of some of the messaging functions within
estimate_risk()
, including creation of new messaging for other models and scenarios specific to theuse_dat
andadd_to_dat
argumentsConsiderable addition of other helper functions and capabilities in support of estimating with other models and the
use_dat
andadd_to_dat
argumentsMoving
internal_call_* <- TRUE
to inside relevant sections and changing name to*_requested
Refactoring of method to return tibble of NAs when there are input problems
Many more tests for added functionality
preventr 0.10.0
CRAN release: 2024-08-17
-
User-visible changes:
Shiny app available online at https://martingmayer.shinyapps.io/prevent-equations/ or https://tiny.cc/prevent-equations, and users can also access this via
app()
-
Arguments
egfr
andbmi
within theestimate_risk()
function (and its synonymest_risk()
) gain the ability to accept a call to a corresponding, non-exported function rather than passing the corresponding value directly; entering the value directly remains an option (and there is no intent for that to change)For
egfr
, the supported call iscalc_egfr()
(or a synonym)For
bmi
, the supported call iscalc_bmi()
(or its synonym)
-
estimate_risk()
andest_risk()
now advise 30-year risk prediction for people > 59 years is questionable via two warnings:In the console (that can be suppressed by setting
quiet = TRUE
)In the column
input_problems
of the return tibble (quiet
has no impact here)
All the above changes also have corresponding documentation within the relevant function
-
Internal changes:
Moved
message_maybe()
,warn_maybe()
, andvalid
to helpersAdded tests for new functionality