Dropped the re-exports (rxode2(), rxode(), RxODE(), ini(),
model(), model<-, rxRename(), rxSolve(), rxUiGet(), logit(),
expit(), lotri(), autoplot() and %>%). Load nlmixr2 (or
rxode2/magrittr) to get them; this also works around a roxygen2 8.1.0
re-export failure (issue #47, r-lib/roxygen2#1915).
monolix2rx(), mlxtran() and mlxTxt() now have dirn to giving
the actual directory of the Monolix project, in case the project
moved for some reason. This makes it possible to translate project files
outside the project directory (#44)
The project directory in mlxtran is now absolute.
Import Monolix 2024 Excel (.xls, .xlsx; first sheet) and SAS
(.sas7bdat, .xpt) data sets, using readxl/haven when they are
installed (issue #10).
The data set regressor columns (use=regressor in [CONTENT]) are now
matched to the model regressors (use=regressor in [LONGITUDINAL]) by
their column order in the data set, as Monolix does, and renamed to the
model names on import. A mismatched regressor count or a missing
regressor column is now an error (issue #2).
Imported amt/time/dv character columns now match na.strings
literally (ignoring surrounding whitespace); the default "." was a
regular expression wildcard, so any single-character value was silently
turned into NA. Genuine NA, blank and "NaN" values no longer keep
such a column as character (issue #56).
Imported data sets now cast the continuous covariates to double;
previously the categorical covariates were cast instead, turning
character categories into NA.
Support the Monolix 2024 file specification file={path='data.csv'} in
addition to the older file='data.csv'; the two are equivalent. This
applies to the data file in <DATAFILE> [FILEINFO] (and
<DATA_FORMATTING> [FILEINFO]) as well as the model file in
<MODEL> [LONGITUDINAL] (issue #43).
Categorical covariate transformations ([COVARIATE] DEFINITION:
transform=/categories=/reference=) without a reference now fall
back to the first category instead of assigning an empty label; the
transformation translation is now tested end-to-end (issue #6).
Range-check the input length in all 13 trans_* parser entry-points
before narrowing it for dparse()'s int buffer length. A buffer of
INT_MAX bytes or more now raises a clean R error instead of handing
the parser a truncated (possibly negative) length. This is defensive:
every current caller passes an R string, which R already caps at
INT_MAX bytes.
Removed the dparser ambiguities in the EQUATION:/PK:,
[LONGITUDINAL] DEFINITION: and file= grammars, and made the equation
statement list plain left recursive. Parsing long equation blocks is now
linear instead of quadratic; if/else blocks with function calls parse
up to ~80x faster. Setting MONOLIX2RX_STRICT_AMBIGUITY (as the tests
do) makes any remaining grammar ambiguity an error (issue #51).
Fixed implicit ptrdiff_t to int truncation in rc_dup_str (src/shared.c);
pointer differences are now range-checked before conversion to int.
Fixed int index/column overflow in getLine (src/parseSyntaxErrors.h):
both are now size_t with explicit bounds checks before use. The line
buffer is now R_alloc()'d so it is reclaimed if an error longjmps out of
the syntax-error highlighter.
A syntax error reported on an empty line no longer writes a NUL byte into the error report, which silently cut off the rest of the report.
rc_dup_str() now gives each duplicated string its own allocation. It used
to append into one growing buffer, so a reallocation left pointers from
earlier calls (held across calls, e.g. both operands of a logical operator)
pointing at freed memory.
A syntax error's R error message now includes the highlighted source line and caret. They were only printed to the console because the header written to the error report first suppressed them.
Added thread-safety comment to src/shared.c documenting that the global
parser state is intentionally not mutex-protected, consistent with R's
single-threaded execution model.
Added aaaCranMonolix2rxThreads(), run first in the examples, which limits
CRAN checks to 2 threads to cut the example time.
Defensive drop = FALSE on the imported thetaMat covariance subset so a single surviving parameter is not collapsed to a scalar.
Parameters whose off-diagonal covariances are NaN/NA/Inf are now also dropped from the imported thetaMat (previously only the diagonal was checked for NaN/NA, so non-finite covariances could silently propagate into simulations).
When every parameter is dropped from the imported thetaMat, the covariance information is now ignored with a warning instead of storing a 0x0 matrix that would break rxSolve() simulations; rxSolve() also warns when nStud > 1 is requested but no thetaMat is available, so uncertainty is never silently omitted.
Fixed rxSolve() fallbacks that read dfObs/thetaMat from the wrong location when the values were stored on the model instead of its meta environment.
rxSolve() now actually uses the Monolix-style maxSS it reports (number of steady-state doses plus one); previously the computed value was ignored and the literal default 10000L was passed to the solver. The guard also checked missing(maxSS) twice where it meant minSS, so a user-specified minSS no longer gets silently overwritten. Note this can change steady-state simulation results: like Monolix itself, a fixed number of doses is now simulated, so slowly accumulating drugs reproduce Monolix's (possibly pre-steady-state) concentrations instead of being dosed to full steady state; pass maxSS/minSS explicitly to override.
Updated for new solving option in rxode2 4.0 (and depend on the packages)
Bug fixes for importing models from lixoftConnectors.
ignoreline support #22rxCov_ don't add to iniRemove rxode2parse LinkingTo
Add urls for website
Remove sentence about the residual specification not always being captured. Right now for 'Monolix' it always is.