New features and changes

  • When passed an nmbayes model (defined by the bbr.bayes package), nm_join() now gives a more informative error that points to bbr.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 the nmbayes model type in bbr.bayes. (#663)

  • The character methods for tail_lst() and tail_output() have been adjusted to work with custom model types where *.lst and OUTPUT files 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 like nm_data() to be used pre-model submission. Support for bbi_log_df methods and a new .check_exists argument (defaults to TRUE) have also been added. (#664)

New features and changes

  • New initial_estimates() function for extracting and formatting initial parameter estimates from a NONMEM control stream file. (#646)

  • New tweak_initial_estimates() function for tweaking or ‘jittering’ initial parameter estimates. Only $THETA records are supported for now. (#646)

Bugs addressed

Bugs addressed

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 nmrec for parsing control stream files, rather than regex/string manipulation. (#600, #603, #604, #606, #612)
  • nm_join now tracks the origin of each column and stores it as an attribute of the return value (mostly important for bbr.bayes). (#617)

Bugs addressed

  • update_model_id would replace the id with the based_on field, 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 using R 4.0 and an older version of tibble. (#625)

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)

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 by utils::file.edit(). (#570)

  • The vignettes now include examples of calling run_log() with the .include argument (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_mode now 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

New features and changes

  • submit_model() now has an .overwrite argument (similar to how new_model() and copy_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(), and config_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 = TRUE to 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 like nm_join() and nm_tables() that use nm_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 forward nm_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 as options("bbr.bbi_exe_path"), because that option needs to contain a path to the actual executable. This was fixed so that now use_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 specify parallel = TRUE to have submit_model() respect the number passed to threads. Unfortunately, it also introduced a bug where passing parallel = FALSE without passing threads causes an error. This has been corrected so that passing parallel = FALSE without passing threads will disable parallelization for that run. (#554)

New features and changes

  • The new .include argument of config_log(), run_log(), and summary_log() limits the result to the specified run names or tags. (#484, #526)

  • Models can now be starred. See add_star() and remove_star(). (#487)

  • New convenience functions get_omega(), get_sigma(), and get_theta() return labeled values, with the OMEGA and SIGMA values expanded to a full matrix. (#515)

  • param_estimates gained an .alpha argument that’s useful for identifying the ETAs flagged by the eta_pval_significant heuristic. (#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 threads value above one in .bbi_args but does not specify parallel, parallel = TRUE is added so that the threads value is in effect. (#514)

  • New functions check_nonmem_finished() and wait_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 NA values as -999999999. bbr now maps all occurrences of this value to NA when creating a model summary object. (#524)

  • When bbi v3.2.0 or later is available, model_summaries() now uses bbi’s concurrency rather than calling model_summary() on each model, leading to a speed up when many models are passed. (#527)

  • model_diff() learned to print a message rather than call diffobj::diffFile() when there are no changes to avoid confusingly displaying the entire file. (#522)

  • use_bbi now creates leading directories if needed. (#499)

  • new_model now ignores the extension of the supplied path. (#510)

  • The output of print_bbi_args has been reworked to make it easier to digest. (#537)

Bug fixes

Bug fixes

Developer-facing changes

  • Added YAML file and script in inst/validation/ for creating validation documents with mrgvalidate. (#469)

New features

Bug fixes

  • param_estimates_batch() now transforms the parameter names that come from bbi nonmem params ..., replacing _ with , to match the format that is used elsewhere and expected by downstream tools. (#457)

Docs

  • New functions from the 1.2.0 release are now mentioned in the docs. (#440)

Changes

  • use_bbi() no longer depends on external tools such as wget and tar, hopefully improving its reliability across different systems. (#448)

Bug fixes

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(), and nm_data() for reading in NONMEM files more easily. (#426)

  • Added nm_join(), nm_tables(), and nm_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() and check_cor_threshold() for pulling in covariance and correlation matrices from NONMEM .cov and .cor files. (#414)

  • Passing the .new_model argument to copy_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.0 release, replace_tags(), replace_bbi_args(), replace_based_on(), add_decisions(), and replace_decisions() have been removed.

  • Deprecated check_nonmem_table_output(), check_grd(), and check_ext() and replaced them with nm_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(), and plot_ext() in an effort to more tightly define the scope of bbr. These functions will warn about this for two more releases and then begin to error for two more releases before being removed altogether. (#426)

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)

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 the bbi processes would get killed by processx when the R objects were garbage collected. (#390)

  • bbr now checks for a valid configuration file before calling out to bbi to avoid the situation where .wait = FALSE and the “no config file” error from bbi is swallowed. Note, this check is skipped if .dry_run = TRUE. (#390)

New features and changes

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 (in bbr) by routing the stdout and stderr to a temp file and then reading from it when necessary, instead of relying on processx to poll the process. (#374)

New features and changes

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_model parent class to bbi_nonmem_model and bbi_nonmem_summary objects. Many of the helpers in get-path-from-object.R now 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 create bbi_stan_model and bbi_stan_summary objects that will also inherit from this parent class. (#332)

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 bbi is increased to 3.0.2. This is because there was a breaking change in bbi 3.0.2 which changed all references to "Patients" in the bbi nonmem summary output to "Patients" (discussed further below). Also because there was a bug where bbi could not parse the summary output from NONMEM 7.5 and this bug was fixed in bbi 3.0.1.

  • options("bbr.bbi_exe_path"), which tells bbr where to look for a bbi installation, now defaults to "bbi". This means that, by default, bbr will look for a bbi installation 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 .Rprofile for their project because this explicitly guarantees the correct bbi installation is being used. (#322)

  • The use_bbi() installer function first tries to install to whatever path is set in options("bbr.bbi_exe_path"), falling back to the bbi in my $PATH (accessed via Sys.which("bbi")) and then an OS-dependent default, in that order. See ?use_bbi() for more details. (#322)

  • Added print method for bbi_nonmem_model object. Similar to the bbi_nonmem_summary object, the bbi_nonmem_model object should print nicely in the console, and also look good in .Rmd chunks with the option results = 'asis'. (#307)

  • Added get_data_path() helper function to extract the absolute path to the input data file from bbi_nonmem_model and bbi_nonmem_summary objects. (#314)

  • Added build_path_from_model() helper function to extract the absolute path to various output files from bbi_nonmem_model and bbi_nonmem_summary objects. (#314)

  • The output from model_summary() (and model_summaries() and summary_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.0 release, replace_tags(), replace_bbi_args(), replace_based_on(), add_decisions(), and replace_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 .Rprofile or anything in the renv folder. 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 bbi version constraint. This is intended only for developers who want to try out development (unreleased) version of bbi while developing on bbr. (#305)

  • Our Drone CI system now uses a .drone.yml instead 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)

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.

New features and changes

  • The minimum compatible version of bbi is increased to 3.0.0.