bbr 1.14.3
Changes
An internal function for finding models has been adjusted for compatibility with stringr 1.6.0. The main user-visible consequence is that
get_boot_models()still returns an unnamed list when stringr 1.6.0 or later is installed. (#753)config_log(),run_log(), andsummary_log()no longer emit the “All models excluded by filter” warning when no models are discovered under a directory. (#753)
bbr 1.14.2
Bug fixes
-
add_dofv()has been updated to warn instead of error when a model no longer exists on disk. (#750)
bbr 1.14.0
New features and changes
summary_log()andadd_summary()now report the Akaike information criterion (as the “aic” column) and Bayesian information criterion (as the “bic” column). (#743)The new function
add_dofv()extends a log with the change in objection function value between each row’s model and a reference model. (#743)submit_model()has a guard to prevent Metworx users from accidentally submitting models with Slurm’sqsubshim. This guard has been updated for a Metworx-side change. (#742)run_nmtran()learned to handle amaxlimvalue of 100 for compatibility with older bbi versions. (#744)
bbr 1.13.0
New features and changes
- Adds submission mode for Slurm (
submit_model(.mode = "slurm")). (#724) -
model_treenow hassize_byandfont_sizearguments.size_byallows users to control the node sizing by passing a particular column present in.log_df.font_sizeallows users to set the font size of model labels and tooltips. (#720)
Bugs addressed
- Fixed a bug with
nm_data(filter = TRUE)where NA values would cause translated filters to not function properly.IGNORE=Ctype filters also did not behave as expected. (#729, #730) - Fixed a bug where
model_tree()would fail if no origin model existed in.log_df. (#726)
bbr 1.12.0
New features and changes
New model tree feature:
bbrnow allows you to visualize anyrun_log()as an interactive model tree diagram viamodel_tree(). This function allows users to easily visualize and track the modeling process for a given project and display any information available in arun_log(), such as model summary information, configuration options, and more. See the vignette here (#673).New
run_nmtran()function for runningNM-TRANon a model object to validate its control stream for correct coding before submission. TheNM-TRANdataset (FDATA) and otherNONMEMartifacts can be further inspected by keeping the run directory around (#705).nm_data()now has afilterargument, allowing the user to filter data based onIGNORE LISTorACCEPT LISToptions defined in the$DATArecord of aNONMEMcontrol stream file (#711).setup_bootstrap_run()now has adataargument, allowing users to provide their own starting dataset to resample from. This defaults toNULL, which will use the output fromnm_data(.boot_run, filter = TRUE)(#707, #711).
Bugs addressed
- Bootstrap adjustment: previously
setup_bootstrap_run()assumed aNUMcolumn was present in the input dataset (the default.join_colinnm_join()).nm_join()was being used in the back-end to create the starting dataset to resample from; the intention being to only include subjects that entered the original problem. Given thenm_join()use, this also required that the original model had finished executing before bootstrapping. Rather than usingnm_join()by default, we now usenm_data(.boot_run, filter = TRUE). This both fixes the aforementioned bug and removes the requirement that the base model (model being bootstrapped) has been executed. If the model has been executed, however, we will check the number of records to ensure the filtering was done correctly (#707, #711).
bbr 1.11.0
New features and changes
New bootstrap feature:
bbrnow supports the creation, management, and summary of bootstrap runs. Runs are initialized and set up usingnew_bootstrap_run()
andsetup_bootstrap_run(), respectively, and are tracked via the newbbi_nmboot_modeltype object. They can be submitted the same as any other model, after which they can be summarized viasummarize_bootstrap_run()and “cleaned up” viacleanup_bootstrap_run(). (#671, #687, #701)New simulation feature:
bbrnow supports simple simulations.add_simuation()will create and submit a newbbi_nmsim_modelobject, which is then attached to the existingbbi_nonmem_modelobject. Additional new functions are also exported, includingnm_join_sim(), which serves to join the simulation table to the input data. (#687)check_nonmem_finished()now returnsFALSEif an output directory does not exist. (#693)New
get_model_status()helper for returning messages that indicate which model(s) have finished executing and which are incomplete. (#671, #693)Add
.delayargument towait_for_nonmem()to account for variability in the amount of time required to wait before checking for the presence of an output directory (e.g., batch submissions). (#693)Removed parenthesis from
THETAnames ininitial_estimates(). The intent was to match the output fromparam_estimates()so initial and final estimates could be joined more easily. (#674)
bbr 1.10.0
New features and changes
When passed an
nmbayesmodel (defined by thebbr.bayespackage),nm_join()now gives a more informative error that points tobbr.bayes::nm_join_bayes(). (#662)check_nonmem_finished()has been converted to a method so that tailored logic can be implemented for derived model types, such as thenmbayesmodel type inbbr.bayes. (#663)The character methods for
tail_lst()andtail_output()have been adjusted to work with custom model types where*.lstandOUTPUTfiles do not reside in the top-level output directory. (#661)get_data_path()can now pull from the control stream file if the model has not yet been submitted. This allows functions likenm_data()to be used pre-model submission. Support forbbi_log_dfmethods and a new.check_existsargument (defaults toTRUE) have also been added. (#664)
bbr 1.9.0
New features and changes
New
initial_estimates()function for extracting and formatting initial parameter estimates from aNONMEMcontrol stream file. (#646)New
tweak_initial_estimates()function for tweaking or ‘jittering’ initial parameter estimates. Only$THETArecords are supported for now. (#646)
Bugs addressed
With the latest
data.tablerelease (1.15.0),param_estimates_batch()failed for an edge case due to a change in the header detection heuristics.param_estimates_batch()now tellsdata.table::fread()to expect a header. (#648)When passed
.recurse = TRUE,run_log(),config_log(), andsummary_log()included nested models, which was not by design. Any models under another model’s output directory are considered an implementation detail. (#643, #644, #645)
bbr 1.8.1
Bugs addressed
-
inherit_param_estimates()callsmodel_summary()underneath and that failed when the parent model did not have.grdor.shkfiles.inherit_param_estimates()now has a.bbi_argsargument (similar tonm_join()) that defaults to not looking for.shkand.grdfiles. (#638)
bbr 1.8.0
New features and changes
- New
inherit_param_estimates()function for setting the initial parameter estimates of a model using the final estimates of a previously executed model. (#623) - Improved documentation and vignettes. (#622, #627, #631)
- Some functions now rely on
nmrecfor parsing control stream files, rather than regex/string manipulation. (#600, #603, #604, #606, #612) -
nm_joinnow tracks the origin of each column and stores it as an attribute of the return value (mostly important forbbr.bayes). (#617)
Bugs addressed
-
update_model_idwould replace the id with thebased_onfield, which was a relative file path rather than a model id. In other words, this function did not support child models created in sub-directories (or otherwise a different directory than the parent model). (#614) -
delete_models()previously ran into issues when usingR 4.0and an older version oftibble. (#625)
bbr 1.7.0
Changes
All of the code changes in this release focus on enabling third-party packages to introduce new model types and were motivated by the soon-to-be-released bbr.bayes package. Aside from three new generics, these changes are internal and should not affect any user-facing behavior on the bbr side. (#543)
bbr 1.6.0
New features and changes
New
open_model_file()function opens the model definition file (the control stream for NONMEM models) in RStudio or any other editor supported byutils::file.edit(). (#570)The vignettes now include examples of calling
run_log()with the.includeargument (added in bbr 1.4.0). (#575)delete_models()messages have been improved. (#577)use_bbi()now allows a relative path and, on Windows, aborts if the path doesn’t end with “.exe”. (#579)bbr.bbi_exe_modenow defaults to “local” when not on Linux (where the default remains “sge”). (#580)Display a warning on Windows users if bbi version is below 3.2.2. (#581)
Bugs addressed
Various updates for compatibility with tidyr 1.3.0 and dplyr 1.1.0 (#572, #578).
model_summaries(),build_path_from_model(), andget_config_path()unintentionally signaled an error when the output directory of a model didn’t exist. (#573)use_bbi()now does a better job of deciding when to message the user about further setup that’s needed. (#579)
bbr 1.5.0
New features and changes
submit_model()now has an.overwriteargument (similar to hownew_model()andcopy_model_from()have one). Previously, the user had to pass this through as.bbi_args = list(overwrite = TRUE)in order to overwrite output from a previous model execution. (#547)Functions
run_log(),summary_log(), andconfig_log()all previously defaulted to searching for models recursively in sub-directories. This has been changed so that now users will need to pass.recurse = TRUEto search recursively. The primary reason for the change is user feedback indicating that, more often than not, sub-directories under a model directory contain something like a bootstrap, which would consist of a large number of models that shouldn’t be included in the log table. Additionally, these sub-directories sometimes contain enough models (5000+) to make the*_log()call take quite some time to complete. (#492)
Bugs addressed
Previously,
nm_file()(and, as a result, functions likenm_join()andnm_tables()that usenm_file()) was upper-casing all columns in the table that was loaded. This was not part of the original specification and ended up causing problems with some users’ downstream code, which expected the column names to remain intact. Going forwardnm_file()does not modify any column names. (#564)Previously, a user could pass a directory path to
use_bbi()and have the executable installed inside that directory. That behavior was undocumented and, more importantly, led to problems when the same directory path was set asoptions("bbr.bbi_exe_path"), because that option needs to contain a path to the actual executable. This was fixed so that nowuse_bbi()explicitly accepts only a path to the desired location of the executable, erroring if it receives a path to an existing directory instead. (#552)bbi 1.4.0(specifically #514) made the change that users no longer have to specifyparallel = TRUEto havesubmit_model()respect the number passed tothreads. Unfortunately, it also introduced a bug where passingparallel = FALSEwithout passingthreadscauses an error. This has been corrected so that passingparallel = FALSEwithout passingthreadswill disable parallelization for that run. (#554)
bbr 1.4.0
New features and changes
The new
.includeargument ofconfig_log(),run_log(), andsummary_log()limits the result to the specified run names or tags. (#484, #526)Models can now be starred. See
add_star()andremove_star(). (#487)New convenience functions
get_omega(),get_sigma(), andget_theta()return labeled values, with theOMEGAandSIGMAvalues expanded to a full matrix. (#515)param_estimatesgained an.alphaargument that’s useful for identifying the ETAs flagged by theeta_pval_significantheuristic. (#497)nm_join()now aborts if the join column has duplicate values, suggesting to the caller that the table format probably needs to be widened to prevent NONMEM from truncating the values. (#533)If the caller specifies a
threadsvalue above one in.bbi_argsbut does not specifyparallel,parallel = TRUEis added so that thethreadsvalue is in effect. (#514)New functions
check_nonmem_finished()andwait_for_nonmem()enable checking and waiting on models submitted to the grid. (#480)Added
test_threads()for benchmarking simulation run times with various threads values. (#473, #489, #519, #542)Added
check_run_times()for checking the estimation times of model runs. (#473, #489, #511)Added
delete_models()for removing all model files associated with specified model tags. (#473)Updated parallel tips and tricks vignette to reference new
test_threads()function and related helpers. (#503)bbi encodes “unspecified” and
NAvalues as-999999999. bbr now maps all occurrences of this value toNAwhen creating a model summary object. (#524)When bbi v3.2.0 or later is available,
model_summaries()now uses bbi’s concurrency rather than callingmodel_summary()on each model, leading to a speed up when many models are passed. (#527)model_diff()learned to print a message rather than calldiffobj::diffFile()when there are no changes to avoid confusingly displaying the entire file. (#522)use_bbinow creates leading directories if needed. (#499)new_modelnow ignores the extension of the supplied path. (#510)The output of
print_bbi_argshas been reworked to make it easier to digest. (#537)
Bug fixes
nm_join()did not reliably sort the resulting data frame when passed.superset = TRUE. (#508)nm_file()and friends now detect duplicate column names and make them unique. (#530, #539)Unlike
submit_model(),submit_models()didn’t abort whenbbi.yamlwas missing. (#496)In combination with a change in bbi v3.2.0,
model_summary()can now handle.lstfiles that haveNaNobjective function values. (#506)
bbr 1.3.1
Bug fixes
- Added support for
$TABsyntax innm_table_files(). (#466)
Developer-facing changes
- Added YAML file and script in
inst/validation/for creating validation documents withmrgvalidate. (#469)
bbr 1.3.0
New features
- Added
param_estimates_compare()for comparing the result ofparam_estimates_batch()to a single model (or, more generally, for comparing a set of parameter estimates). (#457)
Bug fixes
-
param_estimates_batch()now transforms the parameter names that come frombbi nonmem params ..., replacing_with,to match the format that is used elsewhere and expected by downstream tools. (#457)
bbr 1.2.1
Docs
- New functions from the 1.2.0 release are now mentioned in the docs. (#440)
Bug fixes
use_bbi()printed the wrong current release when an older version was requested. (#144)use_bbi()andbbi_version()crashed if the bbi executable path contained spaces. (#409)model_summary()failed with an unclear error message when a caller accidentally placed more than one.lstfile in the model directory. (#449)bbi_help()had a longstanding regression that prevented it from emitting any output. (#447)bbi nonmem summaryused to fail with an out-of-bounds error when fedONLYSIMoutput, but, as of bbi v3.1.1, it sets the “only_sim” field.print.bbi_nonmem_summary()andparam_estimates.bbi_nonmem_summary()have been updated to check for the new field. (#443)
bbr 1.2.0
This release adds a number of helper functions, primarily for use with NONMEM models.
New features and changes
Added
nm_file(),nm_grd(),nm_tab(),nm_par_tab(), andnm_data()for reading in NONMEM files more easily. (#426)Added
nm_join(),nm_tables(), andnm_table_files()for reading in NONMEM tables more easily. Notably,nm_join()can be used to get a single tibble containing your NONMEM input data joined against all of your table outputs. (#429 and #430)param_estimates_batch()for extracting a tibble of parameter estimates from a batch of NONMEM runs. Especially useful for large batches of runs created by something like a bootstrap. (#386)cov_cor()andcheck_cor_threshold()for pulling in covariance and correlation matrices from NONMEM.covand.corfiles. (#414)Passing the
.new_modelargument tocopy_model_from()is now optional. By default, it now tries to increment to the next available integer in the destination directory (the directory containing the parent model). (#424)update_model_id()for updating mentions of the parent model in the child model’s control stream. (#417)Per guidance in
bbr 1.0.0release,replace_tags(),replace_bbi_args(),replace_based_on(),add_decisions(), andreplace_decisions()have been removed.Deprecated
check_nonmem_table_output(),check_grd(), andcheck_ext()and replaced them withnm_file()variants. These functions will warn about this for two more releases and then begin to error for two more releases before being removed altogether. (#426)Deprecated
plot_nonmem_table_df(),plot_grd(), andplot_ext()in an effort to more tightly define the scope ofbbr. These functions will warn about this for two more releases and then begin to error for two more releases before being removed altogether. (#426)
bbr 1.1.4
Docs
- Added “Running NONMEM in Parallel: bbr Tips and Tricks” vignette. (#407)
Bug fixes
- Fixed bug where adding tags as a list instead of a character vector broke downstream functions like
collapse_to_string()(#393)
bbr 1.1.3
Bug fixes
Fixed a bug where submitting multiple models in a loop with
submit_model(.mode = "local", .wait = FALSE)would cause the models to never finish because thebbiprocesses would get killed byprocessxwhen the R objects were garbage collected. (#390)bbrnow checks for a valid configuration file before calling out tobbito avoid the situation where.wait = FALSEand the “no config file” error frombbiis swallowed. Note, this check is skipped if.dry_run = TRUE. (#390)
bbr 1.1.2
New features and changes
Added
options(bbr.bbi_exe_mode)for globally setting.modeargument tosubmit_model()andsubmit_models(). (#377)Added
.bbi_argsargument tobbi_init()for passing through defaults to be stored in the createdbbi.yamlfile. (#378)
bbr 1.1.1
Bug fixes
- There was a bug where submitting more than roughly 250 models at time via
submit_models()(e.g. for bootstrapping) would hang indefinitely. This had something to do with a bug in processx. It was fixed (inbbr) by routing the stdout and stderr to a temp file and then reading from it when necessary, instead of relying onprocessxto poll the process. (#374)
bbr 1.1.0
New features and changes
Added
tags_diff()function for comparing the tags between different models. (#337)Added
model_diff()function for comparing the model files between different models. (#342)Added
check_up_to_date()function for checking whether the model file(s) and data file(s) associated with a model have changed since the model was run. (#338)Added more documentation about the heuristics returned from
model_summary.bbi_nonmem_model()(#343)
Bug fixes
-
param_estimates()now correctly errors when a Bayesian method is used but is not the final method. (#344)
Developer-facing changes
- Added a
bbi_modelparent class tobbi_nonmem_modelandbbi_nonmem_summaryobjects. Many of the helpers inget-path-from-object.Rnow dispatch on this class. This had been discussed in the past but was primarily done now in preparation for beginning development for Stan modeling, which will createbbi_stan_modelandbbi_stan_summaryobjects that will also inherit from this parent class. (#332)
bbr 1.0.0
This release is fairly small in terms of changes, but it increments to a new major release version primarily because of the name change which happened in bbr 0.12.0. The most significant change, from a user perspective, is to the default behavior of where bbr looks for bbi on the system. This change is described in issue #321 and a bit more detail is given below.
The 1.0.0 release also represents a stable feature set of basic NONMEM-related functionality. While there will be more features and development relevant to NONMEM in the future, for the immediate future we are shifting our attention towards building similar functionality to support Stan modeling with bbr.
New features and changes
The minimum compatible version of
bbiis increased to3.0.2. This is because there was a breaking change inbbi 3.0.2which changed all references to"Patients"in thebbi nonmem summaryoutput to"Patients"(discussed further below). Also because there was a bug wherebbicould not parse the summary output from NONMEM 7.5 and this bug was fixed inbbi 3.0.1.options("bbr.bbi_exe_path"), which tellsbbrwhere to look for abbiinstallation, now defaults to"bbi". This means that, by default,bbrwill look for abbiinstallation in the user’s$PATH.options("bbr.bbi_exe_path")can still be set manually by the user and, in fact, we encourage users to set this to an absolute path in their.Rprofilefor their project because this explicitly guarantees the correctbbiinstallation is being used. (#322)The
use_bbi()installer function first tries to install to whatever path is set inoptions("bbr.bbi_exe_path"), falling back to thebbiin my$PATH(accessed viaSys.which("bbi")) and then an OS-dependent default, in that order. See?use_bbi()for more details. (#322)Added print method for
bbi_nonmem_modelobject. Similar to thebbi_nonmem_summaryobject, thebbi_nonmem_modelobject should print nicely in the console, and also look good in.Rmdchunks with the optionresults = 'asis'. (#307)Added
get_data_path()helper function to extract the absolute path to the input data file frombbi_nonmem_modelandbbi_nonmem_summaryobjects. (#314)Added
build_path_from_model()helper function to extract the absolute path to various output files frombbi_nonmem_modelandbbi_nonmem_summaryobjects. (#314)The output from
model_summary()(andmodel_summaries()andsummary_log()) will now refer to individuals in the data set as"Subjects"instead of"Patients", in accordance with the terminology widely used in scientific and medical literature. (#320)Per guidance in
rbabylon 0.10.0release,replace_tags(),replace_bbi_args(),replace_based_on(),add_decisions(), andreplace_decisions()will now error instead of warn about their impending deprecation. These functions will be removed entirely in two more releases.
Developer-facing changes
We are no longer checking in either the
.Rprofileor anything in therenvfolder. As a result, the development workflow has changed slightly. This change is reflected in the README. (#307 and #308)Added an option to suppress the minimum
bbiversion constraint. This is intended only for developers who want to try out development (unreleased) version ofbbiwhile developing onbbr. (#305)Our Drone CI system now uses a
.drone.ymlinstead of.drone.jsonette. We have also switched the containers that we use for testing in CI to smaller containers which are more specialized for the purpose. (#309)
bbr 0.12.0
This package has been renamed to from rbabylon to bbr and the accompanying command-line tool has been renamed from babylon to bbi (which was already its alias, used throughout the package). Any mentions of babylon and rbabylon throughout the package have been renamed accordingly. Mentions of either in the older parts of this NEWS.md document were left as is for historical purposes.
