Create fit plot
fit_plot.Rd
Creates a fit plot either using the xpose.nlmixr package or using a default ggplot call
Usage
fit_plot(
dfrm,
type = "xpose",
by = "ID",
idv = "TIME",
obs = "DV",
pred = "PRED",
ipred = "IPRED",
grp = "ID",
logy = TRUE,
scales = "fixed",
mdlnm = NULL,
outnm = NULL,
projloc = ".",
...
)
Arguments
- dfrm
data frame as created by the nlmixr function
- type
character defining the type of plot that should be created. currently "xpose" and "user" are supported for xpose or ggplot style of plots
- by
character vector with variables for facetting
- idv
independent variable or x variable
- obs
variable with observed data points
- pred
variable with predicted data points
- ipred
variable with individual predicted data points
- grp
variable for grouping (mainly to draw separate lines)
- logy
logical if y-axis should be displayed on log scale
- scales
character of length one defining the scale parameter of ggplot (e.g. "fixed", "free","free_y",etc)
- mdlnm
character with name of the model
- outnm
character with name of the output file (see details)
- projloc
character with the base location of the shinyMixR project
- ...
Value
in case no outnm is defined a ggplot object will be returned otherwise the results are saved to disk
Details
In case a model is saved, a directory with the name of the model is created within the analysis folder of the current project. Then within this folder the file is saved as outnm. This method was chosen so the interface can easily index applicable files for a certain model. However, this means that output is alwasy saved in this directly regardless of the location of outnm