MonolixSuite in R
Auto Light Dark
Auto Light Dark

Package "monolixSuiteTFL"

monolixSuiteTFL provides functions to create tables, figures, and listings for reporting results from Monolix and PKanalix analyses. Most functions access the results directly from a loaded Monolix or PKanalix project using the lixoftConnectors interface.

Installation and setup

You can download the package from monolixSuiteTFL_2.0.1.tar.gz

System requirements

  • R 4.2.0 or later.

  • MonolixSuite, only for the functions that read Monolix or PKanalix project results. styleTFL() and the other helpers that don't read project results work without it.

Dependencies

monolixSuiteTFL relies on a set of required packages and a set of optional packages.

  • Required (installed automatically from CRAN):

    • ggplot2, dplyr, tidyr, rlang, purrr, stringr, tibble, tidyselect.

  • Optional (provided by MonolixSuite, not available on CRAN):

    • lixoftConnectors. This package is distributed with MonolixSuite and gives access to project results. Functions that read project results need it; without it, they stop with an error saying so. styleTFL() works without it.

  • Optional (install only if you need the corresponding feature):

    • flextable: styled table output, including styleTFL.

    • officer: export to Word (docx) and PowerPoint (pptx).

    • haven, readxl: reading external data files.

    • knitr: building vignettes and report documents.

    • rstudioapi, withr: convenience helpers used in interactive sessions and testing.

Installation Example

R
install.packages(c("ggplot2", "dplyr", "tidyr", "rlang", "purrr", "stringr", "tibble", "tidyselect"))
install.packages("monolixSuiteTFL_2.0.1.tar.gz", repos = NULL, type = "source")

Installing from the file (repos = NULL) does not install dependencies, so install the required CRAN packages first, as above. Optional packages are not needed for installation; add them when a feature needs them, for example:

R
install.packages(c("flextable", "officer"))

Connecting to MonolixSuite

When it loads, the package connects to the MonolixSuite installation given in the monolixSuite= line of ~/lixoft/lixoft.ini. This is the most recently launched MonolixSuite version. If the connection fails, library() shows a message explaining how to fix it.

To use an installation in another folder, set the TFLMonolixSuite.lixoftPath option before loading the package, for example in your .Rprofile:

R
options(TFLMonolixSuite.lixoftPath = "C:/Program Files/Lixoft/MonolixSuite2024R1")
library(monolixSuiteTFL)

You can also call lixoftConnectors::initializeLixoftConnectors(path = ...) before library(monolixSuiteTFL).

Load monolixSuiteTFL before flextable, officer, or any other package that loads the zip package. Once zip is loaded, MonolixSuite can no longer be connected in that R session, and you need to restart R.

Last updated: