-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
Update Master to 0.4.0
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: xpose | ||
Type: Package | ||
Title: Diagnostics for pharmacometric models | ||
Title: Diagnostics for Pharmacometric Models | ||
Version: 0.4.0 | ||
Authors@R: c( | ||
person('Benjamin', 'Guiastrennec', | ||
|
@@ -18,6 +18,10 @@ Authors@R: c( | |
person('Ron', 'Keizer', | ||
role = 'aut', | ||
email = '[email protected]'), | ||
person('Nick', 'Solomon', | ||
role = 'ctb', | ||
comment = 'Wrote the geom_qq_line function', | ||
email = '[email protected]'), | ||
person('Kajsa', 'Harling', | ||
role = 'ctb', | ||
email = '[email protected]'), | ||
|
@@ -34,7 +38,11 @@ Authors@R: c( | |
role = 'ctb', | ||
email = '[email protected]'), | ||
person('Pfizer', role = 'ctb')) | ||
Description: Automated generation of graphical diagnostics for non-linear mixed effect models. | ||
Description: Diagnostics for non-linear mixed-effects (population) | ||
models from 'NONMEM' <http://www.iconplc.com/innovation/nonmem/>. | ||
'xpose' facilitates data import, creation of numerical run summary | ||
and provide 'ggplot2'-based graphics for data exploration and model | ||
diagnostics. | ||
Depends: | ||
R (>= 3.1.2), | ||
ggplot2 (>= 2.2.1) | ||
|
@@ -59,7 +67,7 @@ Suggests: | |
plotly, | ||
webshot, | ||
mvtnorm | ||
License: LGPL-3 + file LICENSE | ||
License: LGPL-3 | ||
URL: https://github.com/UUPharmacometrics/xpose | ||
BugReports: https://github.com/UUPharmacometrics/xpose/issues | ||
Encoding: UTF-8 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
#' Save xpose plot | ||
#' | ||
#' @description Automatically save xpose plots to files. | ||
#' | ||
#' This function was inspired by the \link[ggplot2]{ggsave}. If no arguments are provided, | ||
#' the function will automatically name and save a plot after its run number and the plotting | ||
#' function name by using the metadata attached to the plot. | ||
#' @description Inspired by the \link[ggplot2]{ggsave}, this function | ||
#' facilitates the export of xpose plots. | ||
#' | ||
#' @param plot A xpose plot object. | ||
#' @param file An optional name to be given to the file. Template variables such as @run | ||
#' can be used to generate template names. | ||
#' @param dir Directory under which the xpose plot will be saved. Template variables such as @dir | ||
#' can be used to generate template names. | ||
#' @param file A name with file extension (if device is \code{NULL}) to be given to the | ||
#' output file. Template variables such as \code{@run} (run number) and \code{@plotfun} | ||
#' (plot function) can be used to automatically name files e.g. | ||
#' \code{file = '@[email protected]'}. | ||
#' @param dir Directory under which the xpose plots will be saved. Template variables | ||
#' such as \code{@dir} can be used to generate template names. | ||
#' @param device Graphical device to use. Can be either be a device function | ||
#' (e.g. \code{\link{png}}), or one of 'eps', 'ps', 'tex' (pictex), | ||
#' 'pdf' (default), 'jpeg', 'tiff', 'png', 'bmp', 'svg' or 'wmf' (windows only). | ||
|
@@ -23,11 +22,11 @@ | |
#' \dontrun{ | ||
#' xpdb_ex_pk %>% | ||
#' dv_vs_ipred() %>% | ||
#' xpose_save() | ||
#' xpose_save(file = file.path(tempdir(), "dv_vs_ipred_example.pdf")) | ||
#' } | ||
#' @export | ||
xpose_save <- function(plot = last_plot(), | ||
file = '@[email protected]', | ||
file = NULL, | ||
dir = NULL, | ||
device = NULL, | ||
width = 7, | ||
|
@@ -37,9 +36,9 @@ xpose_save <- function(plot = last_plot(), | |
...) { | ||
|
||
if (is.null(plot)) { | ||
stop('The `plot` argument is NULL.') | ||
stop('Argument `plot` required.', call. = FALSE) | ||
} else if (is.null(file)) { | ||
stop('The `file` argument is NULL.') | ||
stop('Argument `file` required.', call. = FALSE) | ||
} | ||
|
||
# Parse the dir and file arguments for keywords | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.