nmDocx | R Documentation |
Create a run summary word document
nmDocx(
x,
docxOut = NULL,
docxTemplate = NULL,
plot = TRUE,
titleStyle = getOption("nlmixr.docx.title", "Title"),
subtitleStyle = getOption("nlmixr.docx.subtitle", "Subtitle"),
normalStyle = getOption("nlmixr.docx.normal", "Normal"),
headerStyle = getOption("nlmixr.docx.heading1", "Heading 1"),
centeredStyle = getOption("nlmixr.docx.centered", "centered"),
preformattedStyle = getOption("nlmixr.docx.preformatted", "HTML Preformatted"),
width = getOption("nlmixr.docx.width", 69),
save = FALSE
)
nmSave(x, ..., save = TRUE)
x |
nlmixr fit object. |
docxOut |
Output file for run information document. If not
specified it is the name of R object where the fit is located
with the |
docxTemplate |
This is the document template. If not
specified it defaults to
|
plot |
Boolean indicating if the default goodness of fit
plots are added to the document. By default |
titleStyle |
This is the word style name for the nlmixr
title; Usually this is |
subtitleStyle |
This is the word style for the subtitle which
is |
normalStyle |
This is the word style for normal text. Defaults to
|
headerStyle |
This is the word style for heading text. Defaults to
|
centeredStyle |
This is the word style for centered text
which is used for the figures. Defaults to
|
preformattedStyle |
This is the preformatted text style for R
output lines. Defaults to
|
width |
Is an integer representing the number of characters
your preformatted style supports. By default this is
|
save |
Should the docx be saved in a zip file with the R rds
data object for the fit? By default this is |
... |
when using 'nmSave' these arguments are passed to 'nmDocx' |
An officer docx object
Matthew Fidler
library(nlmixr)
pheno <- function() {
# Pheno with covariance
ini({
tcl <- log(0.008) # typical value of clearance
tv <- log(0.6) # typical value of volume
## var(eta.cl)
eta.cl + eta.v ~ c(1,
0.01, 1) ## cov(eta.cl, eta.v), var(eta.v)
# interindividual variability on clearance and volume
add.err <- 0.1 # residual variability
})
model({
cl <- exp(tcl + eta.cl) # individual value of clearance
v <- exp(tv + eta.v) # individual value of volume
ke <- cl / v # elimination rate constant
d/dt(A1) = - ke * A1 # model differential equation
cp = A1 / v # concentration in plasma
cp ~ add(add.err) # define error model
})
}
fit.s <- nlmixr(pheno, pheno_sd, "saem")
## Save output information into a word document
RxODE::.rxWithWd(tempdir(), # Put document in temporary directory
nmDocx(fit.s)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.