MyNixOS website logo
Description

Templated Word and PowerPoint Reporting of 'nlmixr2' Fitting Results.

This allows you to generate reporting workflows around 'nlmixr2' analyses with outputs in Word and PowerPoint. You can specify figures, tables and report structure in a user-definable 'YAML' file. Also you can use the internal functions to access the figures and tables to allow their including in other outputs (e.g. R Markdown).

nlmixr2rpt

R-CMD-check CRANchecks version cranlogs Active Lifecycle:Experimental

Templated Word and PowerPoint reporting for nlmixr2

Overview

The purpose of this package is to automate the reporting of analyses performed in the nlmixr2 package in both PowerPoint and Word. This is accomplished with a yaml file that contains specifications for report elements (figures and tables) as well as the contents of Word and PowerPoint documents. Internal templates for both the documents and the report yaml file are included. These can be customized: The format of the document templates can be customized for your organization by using the onbrand package. The report contents can be customized by creating a copy of the included yaml file and modifying it to suite your needs (see the vignette below).

Installation

To install off of CRAN:

install.packages("nlmixr2rpt", dependencies = TRUE)

To install the development version from GitHub

#install.packages("devtools") 
devtools::install_github("nlmixr2/nlmixr2rpt", dependencies=TRUE)

Getting Started

PowerPoint

Assuming you have the results of an nlmixr analysis in the object fit you can dump those results into a PowerPoint document by doing the following:

obnd_pptx = read_template(
  template = system.file(package="nlmixr2rpt", "templates","nlmixr_obnd_template.pptx"),
  mapping  = system.file(package="nlmixr2rpt", "templates","nlmixr_obnd_template.yaml"))

obnd_pptx = report_fit(
  fit     = fit, 
  obnd    = obnd_pptx)

save_report(obnd_pptx, "report.pptx")

This creates an onbrand reporting object obnd_pptx. You can add other reporting elements using onbrand or officer. Next the command report_fit() will append the results in the fit object to an onbrand report. After calling report_fit() you can append other reporting elements. Finally you just need to save the document using save_report().

Word

The process for a Word document is the same. You simply need to use a Word onbrand template instead of a PowerPoint.

obnd_docx = read_template(
  template = system.file(package="nlmixr2rpt", "templates","nlmixr_obnd_template.docx"),
  mapping  = system.file(package="nlmixr2rpt", "templates","nlmixr_obnd_template.yaml"))

obnd_docx = report_fit(
  fit     = fit, 
  obnd    = obnd_docx)

save_report(obnd_docx, "report.docx")

Further reading

If you want to learn more about customizing the outputs or using your own organizational templates in reporting, be sure to browse through the documentation and check out the vignettes:

Metadata

Version

0.2.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows