diff --git a/.Rbuildignore b/.Rbuildignore index 4021ef36..c0ddd3ff 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,16 +1,22 @@ -^\.travis\.yml$ ^_config\.yml$ ^_pkgdown\.yml$ ^.*\.Rproj$ +^\.Rprofile$ ^\.Rproj\.user$ +^\.travis\.yml$ +^appveyor\.yml$ +^CODE_OF_CONDUCT\.md$ +^CONTRIBUTING\.md$ +^data-raw$ +^docs$ +^inst/models$ ^LICENSE$ +^pkgdown$ ^README\.Rmd$ +^ROADMAP\.md$ ^temporary$ -^inst/models$ -^data-raw$ -^\.Rprofile$ -^docs$ -^appveyor\.yml$ -^vignettes/interactive_plots.*$ +^vignettes/about.*$ ^vignettes/bestiarium.*$ -^pkgdown$ +^vignettes/cheatsheet.pdf$ +^vignettes/faq.*$ +^vignettes/interactive_plots.*$ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..ffa07e77 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at guiastrennec@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..6c261983 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,44 @@ +# Contributing to xpose + +We are happy that you are willing to help us out with the development of xpose. Before get started please take some time to read the following guidelines. + +## Submitting issues + +Before posting a new issue, please check that it has not already been posted nor is listed in our [road-map](https://github.com/UUPharmacometrics/xpose/blob/master/ROADMAP.md). + +* For **feature requests** make sure to include sufficient information, such as a proposed workflow, plots images, links to posters or publications describing a method, etc. +* For **reporting a bug**, the most important thing is to include a minimal reproducible example so that we can quickly verify your problem, and figure out how to fix it. To make your example reproducible: + + + Attach files such as the NONMEM output files or an xpdb saved as *.Rdata* (i.e. `save(xpdb, "xpdb_error.Rdata")`). Note, you can use the arguments `ignore` and/or `extra_files` of `xpose_data()` to reduce the size of the xpdb whenever needed. + + Include the R code that created the error. Ensure that your code is clear, well commented and as small as necessary to reproduce the error. + + Include the error message. + + Include information on your R session using `sessionInfo()`. + +## Submitting pull requests + +To contribute code to xpose please carefully follow the steps listed below. + +*Note 1: before getting started with a pull request, we strongly encourage you follow the procedure described above for **feature requests** and/or **reporting a bug** to ensure that your project is compatible with the our xpose [road-map](https://github.com/UUPharmacometrics/xpose/blob/master/ROADMAP.md).* + +*Note 2: if you are unfamiliar with the development of R packages, please take some time to read the [R packages](http://r-pkgs.had.co.nz) book by Hadley Wickham.* + +1. [Fork](https://github.com/UUPharmacometrics/xpose/fork) the xpose repository. +1. Make the changes to the code on your fork. + + + Use the [coding style](http://r-pkgs.had.co.nz/style.html) recommended by Hadley Wickham. + + Any new function should have [Roxygen](http://r-pkgs.had.co.nz/man.html) documentation. Internal functions should contain `#' @keywords internal`. Add examples to new functions. Make sure to update the documentation with `devtools::document()` before submitting the pull request. + + [Tests](http://r-pkgs.had.co.nz/tests.html) should be added under *tests/testthat/* to ensure for proper code coverage. + + New plots should be created using the generic `xplot_scatter()`, `xplot_distrib()` or `xplot_qq()`. Check for example the code of *R/plot_gof.R* to see how it should be done. + + General utility functions should be added under *R/utils.R* and plot utility functions under *R/xplot_helpers.R*. + + Use functions from the tidyverse (e.g. dplyr, tidyr, stringr, etc.) whenever possible. + + Add a brief description of your contribution to *NEWS.md* using bullets. Make sure to list it under the most recent xpose version and to add your name as (`@`). e.g. `* Added support for multiple pages plots (@guiastrennec)`. In addition, if your pull request addresses one or several issues, please reference them using the # sign e.g. `* Added support for multiple pages plots (@guiastrennec, #3)` + +1. Run `devtools::check()` on your fork and ensure the absence of any errors, warnings and notes. +1. Create a pull request to the **dev branch** of the **UUPharmacometrics/xpose** repository. + + + Provide a good description of your pull request. Add examples, function outputs and plots images illustrating the new features. + + Make sure that travis-ci, appveyor and codecov tests are all sucessfull + +1. Address all comments until the pull request is either merged or closed. + +All of this may seem complicated at first, but you can contact one of the core developers to assist you throughout the process. diff --git a/DESCRIPTION b/DESCRIPTION index 82ee59fd..3da7b604 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: xpose Type: Package Title: Diagnostics for Pharmacometric Models -Version: 0.4.0 +Version: 0.4.1 Authors@R: c( person('Benjamin', 'Guiastrennec', role = c('aut', 'cre', 'cph'), @@ -50,7 +50,6 @@ Imports: dplyr (>= 0.7.0), ggforce, grDevices, - gridExtra, purrr (>= 0.2.0), readr, rlang (>= 0.1.2), @@ -61,6 +60,7 @@ Imports: stats, vpc (>= 1.0.0) Suggests: + gridExtra, rmarkdown, knitr, testthat, diff --git a/NAMESPACE b/NAMESPACE index 1964ba5f..c5bb4f02 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -114,6 +114,7 @@ export(set_var_labels) export(set_var_types) export(set_var_units) export(slice) +export(software) export(summarise) export(summarize) export(theme_bw2) diff --git a/NEWS.md b/NEWS.md index 018f6234..44e36890 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,15 @@ +# xpose 0.4.1 +### General +* Improved integration of the xpose.nlmixr package +* Prevented a problem in the `print()` function with the upcoming ggplot2 version +* Fixed bug in `summary()` where missing estimation method was reported if NM code written as METH=... instead of METHOD=... +* Fixed bug where labels in `prm_table()`, `get_prm()` were missing with a commented row in $THETA, $OMEGA or $SIGMA +* Fixed bug in `prm_table()`, `get_prm()` where only `NA` would be reported when missing the -1000000006 record in the .ext file (i.e. NM <7.3) +* Improved description of the `prm_table()` output +* Fixed bug in `ind_plots()` where the aesthetics would get mixed up if the variable names were changed +* Small fixes to vignettes, documentations and website + + # xpose 0.4.0 ### General * Added xpdb memory usage to `print.xpose_data()` diff --git a/R/plot_distibution.R b/R/plot_distibution.R index 2146b6dd..43c49a0b 100644 --- a/R/plot_distibution.R +++ b/R/plot_distibution.R @@ -99,11 +99,17 @@ eta_distrib <- function(xpdb, stop('No eta column found in the xpdb data index.', call. = FALSE) } + if (software(xpdb) == 'nonmem') { + post_processing_eta <- reorder_factors(prefix = 'ETA(', suffix = ')') + } else { + post_processing_eta <- NULL + } + xplot_distrib(xpdb = xpdb, quiet = quiet, opt = data_opt(.problem = .problem, filter = only_distinct(xpdb, .problem, facets, quiet), tidy = TRUE, value_col = eta_col, - post_processing = reorder_factors(prefix = 'ETA(', suffix = ')')), + post_processing = post_processing_eta), mapping = aes_c(aes_string(x = 'value'), mapping), type = type, guide = guide, facets = facets, xscale = check_scales('x', log), diff --git a/R/plot_individuals.R b/R/plot_individuals.R index 88cac690..d7cd1575 100644 --- a/R/plot_individuals.R +++ b/R/plot_individuals.R @@ -52,13 +52,17 @@ ind_plots <- function(xpdb, warning('In ind_plots the argument `color` should be used instead of `line/point/text_color`.', call. = FALSE) } + variable_names <- xp_var(xpdb, .problem, type = c('dv', 'pred', 'ipred'))$col + do.call('xplot_scatter', c(extra_args, list(xpdb = xpdb, group = group, quiet = quiet, opt = data_opt(.problem = .problem, tidy = TRUE, filter = only_obs(xpdb, .problem, quiet), - value_col = xp_var(xpdb, .problem, - type = c('dv', 'pred', 'ipred'))$col), + value_col = variable_names, + post_processing = function(x) { + dplyr::mutate(.data = x, variable = factor(x$variable, levels = variable_names)) + }), mapping = aes_c(aes_string(x = xp_var(xpdb, .problem, type = 'idv')$col, y = 'value', line_color = 'variable', text_color = 'variable', line_linetype = 'variable', point_color = 'variable', diff --git a/R/plot_qq.R b/R/plot_qq.R index 96b73674..36f51e92 100644 --- a/R/plot_qq.R +++ b/R/plot_qq.R @@ -101,11 +101,16 @@ eta_qq <- function(xpdb, stop('No eta column found in the xpdb data index.', call. = FALSE) } + if (software(xpdb) == 'nonmem') { + post_processing_eta <- reorder_factors(prefix = 'ETA(', suffix = ')') + } else { + post_processing_eta <- NULL + } xplot_qq(xpdb = xpdb, quiet = quiet, opt = data_opt(.problem = .problem, filter = only_distinct(xpdb, .problem, facets, quiet), tidy = TRUE, value_col = eta_col, - post_processing = reorder_factors(prefix = 'ETA(', suffix = ')')), + post_processing = post_processing_eta), mapping = aes_c(aes_string(sample = 'value'), mapping), type = type, guide = guide, facets = facets, xscale = check_scales('x', log), diff --git a/R/print_xpose_plot.R b/R/print_xpose_plot.R index 4621a082..c06e5709 100644 --- a/R/print_xpose_plot.R +++ b/R/print_xpose_plot.R @@ -43,7 +43,7 @@ print.xpose_plot <- function(x, page, ...) { if (class(x$facet)[1] %in% c('FacetWrapPaginate', 'FacetGridPaginate')) { # Get total number of pages - page_tot <- ggforce::n_pages(repair_facet(x)) + page_tot <- n_pages(repair_facet(x)) # Get and check the page number to be drawn if (!missing(page)) { @@ -102,11 +102,10 @@ print.xpose_plot <- function(x, page, ...) { if (!missing(page)) warning('Faceting not set. Ignoring `page` argument.', call. = FALSE) # Warn for big plots - n_panels <- ggplot2::ggplot_build(x) %>% - {nrow(.$layout$panel_layout)} + panel_tot <- n_panels(x) - if (n_panels > 20) { - msg(c('The faceting resulted in ', n_panels, + if (panel_tot > 20) { + msg(c('The faceting resulted in ', panel_tot, ' panels. The plot may take a while to render.'), quiet = x$xpose$quiet) } @@ -143,3 +142,31 @@ repair_facet <- function(x) { } x } + +# Calculate the total number of pages +n_pages <- function(plot) { + if (utils::packageVersion('ggplot2') <= '2.2.1') { + page <- ggplot_build(plot)$layout$panel_layout$page + } else { + page <- ggplot_build(plot)$layout$layout$page + } + if (!is.null(page)) { + max(page) + } else { + 0L + } +} + +# Calculate the total number of panels +n_panels <- function(plot) { + if (utils::packageVersion('ggplot2') <= '2.2.1') { + page <- ggplot_build(plot)$layout$panel_layout + } else { + page <- ggplot_build(plot)$layout$layout + } + if (!is.null(page)) { + nrow(page) + } else { + 0L + } +} diff --git a/R/prm_table.R b/R/prm_table.R index f6fc2508..4c13c5f0 100644 --- a/R/prm_table.R +++ b/R/prm_table.R @@ -25,10 +25,9 @@ prm_table <- function(xpdb, show_all = show_all, quiet = TRUE) if (transform) { - cat('\nThe relative standard errors for omega and sigma are reported on the approximate -standard deviation scale (SE/variance estimate)/2.\n') + cat('\nReporting transformed parameters:\nFor the OMEGA and SIGMA matrices, values are reported as standard deviations for the diagonal elements and as correlations for the off-diagonal elements. The relative standard errors (RSE) for OMEGA and SIGMA are reported on the approximate standard deviation scale (SE/variance estimate)/2. Use `transform = FALSE` to report untransformed parameters.\n') } else { - cat('\nReporting untransformed parameters.\n') + cat('\nReporting untransformed parameters:\nFor the OMEGA and SIGMA matrices, values are reported as variances for the diagonal elements and as covariances for the off-diagonal elements.\n') } # Convert single prm_df to list diff --git a/R/summarise_nm_model.R b/R/summarise_nm_model.R index 70722f31..3eccb159 100644 --- a/R/summarise_nm_model.R +++ b/R/summarise_nm_model.R @@ -506,12 +506,12 @@ sum_method <- function(model, software) { if (software == 'nonmem') { x <- model %>% dplyr::filter(.$subroutine %in% c('sim', 'est')) %>% - dplyr::filter(stringr::str_detect(.$code, 'METHOD|NSUB')) + dplyr::filter(stringr::str_detect(.$code, 'METH|NSUB')) if (nrow(x) == 0) return(sum_tpl('method', 'na')) x %>% - dplyr::mutate(value = stringr::str_match(.$code, 'METHOD\\s*=\\s*([^\\s]+)')[, 2], + dplyr::mutate(value = stringr::str_match(.$code, 'METH[OD]*\\s*=\\s*([^\\s]+)')[, 2], inter = stringr::str_detect(.$code, '\\sINTER'), lapl = stringr::str_detect(.$code, '\\sLAPLA'), like = stringr::str_detect(.$code, '\\sLIKE')) %>% diff --git a/R/utils.R b/R/utils.R index 7cf3a718..73ae9e11 100644 --- a/R/utils.R +++ b/R/utils.R @@ -277,3 +277,21 @@ make_extension <- function(x) { update_extension <- function(x, ext) { stringr::str_replace(x, '\\.[[:alnum:]]+$', ext) } + + +#' Get software from the xpdb +#' +#' @description Get the name of the modeling softwre on which the xpdb was created +#' +#' @param xpdb An xpose database object. +#' +#' @return The name of a modeling tool. +#' +#' @keywords internal +#' @export +software <- function(xpdb) { + x <- get_summary(xpdb) + x <- x$value[x$label == 'software'] + if (is.null(x)) x <- 'na' + x +} diff --git a/R/xpdb_access.R b/R/xpdb_access.R index 95cbfc39..e907a28f 100644 --- a/R/xpdb_access.R +++ b/R/xpdb_access.R @@ -280,7 +280,7 @@ get_summary <- function(xpdb, #' @param .subprob The subproblem to be used, by default returns the last one for each file. #' @param .method The estimation method to be used, by default returns the last one for each file #' @param digits The number of significant digits to be displayed. -#' @param transform Should diagonal OMEGA and SIGMA elements be transformed to coeficient of variation, +#' @param transform Should diagonal OMEGA and SIGMA elements be transformed to standard deviation and #' off diagonal elements be transformed to correlations. #' @param show_all Logical, whether the 0 fixed off-diagonal elements should be removed from the output. #' @param quiet Logical, if \code{FALSE} messages are printed to the console. @@ -342,7 +342,7 @@ get_prm <- function(xpdb, dplyr::mutate(prm_names = purrr::map(.x = as.list(.$problem), .f = function(x, code) { # Collect parameter names from the model code - code <- code[code$problem == x,] + code <- code[code$problem == x & nchar(code$code) > 0,] list(theta = code$comment[code$subroutine == 'the'], omega = code[code$subroutine == 'ome', ] %>% dplyr::filter(!(stringr::str_detect(.$code, 'BLOCK\\(\\d+\\)(?!.*SAME)') & .$comment == '')) %>% @@ -356,6 +356,11 @@ get_prm <- function(xpdb, prm_se <- grab_iter(ext = data$ext, iter = -1000000001) prm_fix <- grab_iter(ext = data$ext, iter = -1000000006) + if (all(is.na(prm_fix))) { + warning('Iteration `-1000000006` not found in the `.ext` file. Assuming no fixed parameters, check the output carefully.', call. = FALSE) + prm_fix[is.na(prm_fix)] <- 0 + } + if (transform) { if (!is.null(data$cov)) { # build covariance matrix from `.cov` file diff --git a/README.Rmd b/README.Rmd index ecab6ea0..aa70c889 100644 --- a/README.Rmd +++ b/README.Rmd @@ -23,7 +23,7 @@ knitr::opts_chunk$set(fig.path = 'man/figures/', [![travis_status](https://travis-ci.org/UUPharmacometrics/xpose.svg?branch=master)](https://travis-ci.org/UUPharmacometrics/xpose) [![appveyor status](https://ci.appveyor.com/api/projects/status/f6k09rf2cfi3vcs2?svg=true)](https://ci.appveyor.com/project/guiastrennec/xpose)[![cran_version](http://www.r-pkg.org/badges/version/xpose)]() [![codecov](https://codecov.io/gh/UUPharmacometrics/xpose/branch/master/graph/badge.svg)](https://codecov.io/gh/UUPharmacometrics/xpose) - +[![downloads](https://cranlogs.r-pkg.org/badges/grand-total/xpose)](http://cran.rstudio.com/web/packages/xpose/index.html) ### Overview [xpose](https://UUPharmacometrics.github.io/xpose/) was designed as a [ggplot2](https://github.com/tidyverse/ggplot2)-based alternative to [xpose4](http://xpose.sourceforge.net). xpose aims to reduce the post processing burden and improve diagnostics commonly associated the development of non-linear mixed effect models. diff --git a/README.md b/README.md index b2b886d2..f63dff96 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ xpose =============================================================================================================== -[![travis\_status](https://travis-ci.org/UUPharmacometrics/xpose.svg?branch=master)](https://travis-ci.org/UUPharmacometrics/xpose) [![appveyor status](https://ci.appveyor.com/api/projects/status/f6k09rf2cfi3vcs2?svg=true)](https://ci.appveyor.com/project/guiastrennec/xpose)[![cran\_version](http://www.r-pkg.org/badges/version/xpose)]() [![codecov](https://codecov.io/gh/UUPharmacometrics/xpose/branch/master/graph/badge.svg)](https://codecov.io/gh/UUPharmacometrics/xpose) +[![travis\_status](https://travis-ci.org/UUPharmacometrics/xpose.svg?branch=master)](https://travis-ci.org/UUPharmacometrics/xpose) [![appveyor status](https://ci.appveyor.com/api/projects/status/f6k09rf2cfi3vcs2?svg=true)](https://ci.appveyor.com/project/guiastrennec/xpose)[![cran\_version](http://www.r-pkg.org/badges/version/xpose)]() [![codecov](https://codecov.io/gh/UUPharmacometrics/xpose/branch/master/graph/badge.svg)](https://codecov.io/gh/UUPharmacometrics/xpose) [![downloads](https://cranlogs.r-pkg.org/badges/grand-total/xpose)](http://cran.rstudio.com/web/packages/xpose/index.html) ### Overview diff --git a/ROADMAP.md b/ROADMAP.md new file mode 100644 index 00000000..94d760ff --- /dev/null +++ b/ROADMAP.md @@ -0,0 +1,60 @@ +# xpose development roadmap + +## New features +- [ ] Add outliers labeling features e.g. `aes(color = outlier(CWRES, ±6))` +- [ ] Add feature to exp-transform plot scales as `exp = "xy"` +- [ ] Add reference distribution in eta_distrib when `guide = TRUE` +- [ ] Add data checkout diagnostics +- [ ] Add support for time-to-event (TTE) data +- [ ] Add support for categorical data +- [ ] Add gam and diagnostics +- [ ] Add diagnostics for bootstrap, nonpb +- [ ] Add diagnostics for cdd +- [ ] Add diagnostics for frem +- [ ] Add diagnostics for lasso +- [ ] Add diagnostics for llp +- [ ] Add diagnostics for mcmp +- [ ] Add diagnostics for mimp +- [ ] Add diagnostics for npc +- [ ] Add diagnostics for npde +- [ ] Add diagnostics for randtest +- [ ] Add diagnostics for resmod +- [ ] Add diagnostics for scm, boot_scm, xv_scm +- [ ] Add diagnostics for simeval +- [ ] Add diagnostics for sir +- [ ] Add diagnostics for sse +- [ ] Add diagnostics to compare several runs e.g. `compare(xpdb1, xpdb2)` + + +## Improvements +### High priority +- [ ] Update xpose functions to use rlang instead of the standard evaluation version of tidyverse functions (e.g. `mutate_()`) +- [ ] Collect (from the lst file) and make use of parameter labels and units in plot labels +- [ ] Get shrinkage in summary from PsN shrinkage and .shk file +- [ ] Improve `get_file()` to handle 2x same method, same issue with all file dependent functions +- [ ] Improve integration of additional modeling tools by using more generic functions +- [ ] Improve plotting of single line point when surrounded by NA (vpc/ind_plots): + + 1. Identify line points that are "alone" + 1. Have a special `geom_point()` mapped after the line aesthetics that is only plotted if single points are required? + + +### Low priority +- [ ] Improve the use of color, shape scales in `ind_plots()` and `vpc()`, e.g. add color scale options to the xp_theme +- [ ] Find a way to add doses (bolus and infusion) to individual plots (shaded areas and/or vertical lines) +- [ ] Improve `xp_theme()` use with a + method as in ggplot2 (e.g. [here](https://github.com/tidyverse/ggplot2/blob/master/R/theme.r>)) +- [ ] Allow `eta_*()` functions to read ETA values from table data or .phi file? +- [ ] Should `@nobs` `@nsim` `@nind` values be updated when using filtering of the data? +- [ ] Use the `kappa()` function to calculate the condition number directly? + + +## Satelite packages development +- [ ] *xpose_shiny*: a click based shiny interface for xpose +- [ ] *xpose_monolix*: add support for monolix *[help wanted]* +- [ ] others ... + + +## Will not do +- [x] Use [delayed assignment](https://github.com/hadley/pryr/blob/master/R/assign-delayed.r) for data importation +- [x] Use general `aes` assignment (e.g. `color =` will impact point + lines) targeting `ggplot()` + diff --git a/docs/articles/about.html b/docs/articles/about.html index c6a1e7ca..ec148d98 100644 --- a/docs/articles/about.html +++ b/docs/articles/about.html @@ -110,7 +110,7 @@

About xpose

Benjamin Guiastrennec

-

17 November, 2017

+

28 December, 2017

diff --git a/docs/articles/access_xpdb_data.html b/docs/articles/access_xpdb_data.html index 428501b5..f575c7c8 100644 --- a/docs/articles/access_xpdb_data.html +++ b/docs/articles/access_xpdb_data.html @@ -110,7 +110,7 @@

Access the xpdb data

Benjamin Guiastrennec

-

17 November, 2017

+

28 December, 2017

@@ -141,19 +141,19 @@

code <- get_code(xpdb)
 code
# A tibble: 764 x 5
-   problem level subroutine                                                   code
- *   <int> <int>      <chr>                                                  <chr>
- 1       0     0        oth                          Mon Oct 16 13:34:28 CEST 2017
- 2       0     0        oth                                                       
- 3       0     0        oth                                                       
- 4       0     0        oth                                                       
- 5       1     1        pro                                   Parameter estimation
- 6       1     2        inp ID DOSE DV SCR AGE SEX CLASS WT ACE MED1 MED2 TAD TIME
- 7       1     2        inp                                    CLCR AMT SS II EVID
- 8       1     3        dat                              ../../mx19_2.csv IGNORE=@
- 9       1     4        abb                                              DERIV2=NO
-10       1     5        sub                                          ADVAN2 TRANS1
-# ... with 754 more rows, and 1 more variables: comment <chr>
+ problem level subroutine code comment + * <int> <int> <chr> <chr> <chr> + 1 0 0 oth Mon Oct 16 13:34:28 CEST 2017 "" + 2 0 0 oth "" ; 1. Based on: … + 3 0 0 oth "" "; 2. Descripti… + 4 0 0 oth "" ; NONMEM PK exa… + 5 1 1 pro Parameter estimation "" + 6 1 2 inp ID DOSE DV SCR AGE SEX CLASS WT ACE MED1 MED2 TAD TIME "" + 7 1 2 inp " CLCR AMT SS II EVID" "" + 8 1 3 dat ../../mx19_2.csv IGNORE=@ "" + 9 1 4 abb DERIV2=NO "" +10 1 5 sub ADVAN2 TRANS1 "" +# ... with 754 more rows

@@ -163,18 +163,18 @@

data <- get_data(xpdb, table = 'cotab001')
 data
# A tibble: 550 x 4
-       ID  CLCR   AGE    WT
+   ID      CLCR   AGE    WT
    <fctr> <dbl> <dbl> <dbl>
- 1    110    66    68   105
- 2    110    66    68   105
- 3    110    66    68   105
- 4    110    66    68   105
- 5    110    66    68   105
- 6    110    66    68   105
- 7    110    66    68   105
- 8    112    47    73    80
- 9    112    47    73    80
-10    112    47    73    80
+ 1 110     66.0  68.0 105  
+ 2 110     66.0  68.0 105  
+ 3 110     66.0  68.0 105  
+ 4 110     66.0  68.0 105  
+ 5 110     66.0  68.0 105  
+ 6 110     66.0  68.0 105  
+ 7 110     66.0  68.0 105  
+ 8 112     47.0  73.0  80.0
+ 9 112     47.0  73.0  80.0
+10 112     47.0  73.0  80.0
 # ... with 540 more rows

@@ -184,20 +184,19 @@

file <- get_file(xpdb, file = 'run001.ext')
 file
# A tibble: 28 x 16
-   ITERATION  THETA1  THETA2  THETA3   THETA4   THETA5     THETA6     THETA7 `SIGMA(1,1)`
-       <dbl>   <dbl>   <dbl>   <dbl>    <dbl>    <dbl>      <dbl>      <dbl>        <dbl>
- 1         0 25.3535 1.46525 7.45219 0.214386 0.200119 0.00982739 0.00600636            1
- 2         1 26.3257 1.26115 7.34822 0.218727 0.217040 0.00988562 0.00602074            1
- 3         2 25.6334 1.46525 7.29462 0.215628 0.212214 0.00987192 0.00602702            1
- 4         3 26.7952 1.48967 5.76180 0.213014 0.213097 0.00978966 0.00628043            1
- 5         4 26.6949 1.48849 5.69320 0.213037 0.212436 0.00978746 0.00629408            1
- 6         5 26.7278 1.48841 5.66352 0.213025 0.211937 0.00979166 0.00630166            1
- 7         6 26.6462 1.49205 5.02679 0.209907 0.217267 0.01000230 0.00651552            1
- 8         7 26.6205 1.48806 4.92877 0.205327 0.217191 0.01000980 0.00657615            1
- 9         8 26.5629 1.47648 4.62271 0.210903 0.216647 0.00951367 0.00735274            1
-10         9 26.5577 1.45700 4.41353 0.209440 0.216923 0.00903287 0.00873910            1
-# ... with 18 more rows, and 7 more variables: `OMEGA(1,1)` <dbl>, `OMEGA(2,1)` <dbl>,
-#   `OMEGA(2,2)` <dbl>, `OMEGA(3,1)` <dbl>, `OMEGA(3,2)` <dbl>, `OMEGA(3,3)` <dbl>, OBJ <dbl>
+ ITERA… THET… THET… THET… THET… THET… THETA6 THETA7 `SIG… `OMEG… `OME… `OMEG… `OME… `OME… `OME… + <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> + 1 0 25.4 1.47 7.45 0.214 0.200 0.00983 0.00601 1.00 0.0740 0 0.0389 0 0 2.38 + 2 1.00 26.3 1.26 7.35 0.219 0.217 0.00989 0.00602 1.00 0.0744 0 0.0408 0 0 2.39 + 3 2.00 25.6 1.47 7.29 0.216 0.212 0.00987 0.00603 1.00 0.0741 0 0.0411 0 0 2.41 + 4 3.00 26.8 1.49 5.76 0.213 0.213 0.00979 0.00628 1.00 0.0730 0 0.0652 0 0 2.58 + 5 4.00 26.7 1.49 5.69 0.213 0.212 0.00979 0.00629 1.00 0.0730 0 0.0664 0 0 2.58 + 6 5.00 26.7 1.49 5.66 0.213 0.212 0.00979 0.00630 1.00 0.0730 0 0.0664 0 0 2.57 + 7 6.00 26.6 1.49 5.03 0.210 0.217 0.0100 0.00652 1.00 0.0724 0 0.0633 0 0 2.35 + 8 7.00 26.6 1.49 4.93 0.205 0.217 0.0100 0.00658 1.00 0.0717 0 0.0623 0 0 2.35 + 9 8.00 26.6 1.48 4.62 0.211 0.217 0.00951 0.00735 1.00 0.0633 0 0.0547 0 0 2.57 +10 9.00 26.6 1.46 4.41 0.209 0.217 0.00903 0.00874 1.00 0.0766 0 0.0493 0 0 2.47 +# ... with 18 more rows, and 1 more variable: OBJ <dbl>

@@ -207,24 +206,24 @@

prm <- get_prm(xpdb, digits = 4) prm

# A tibble: 11 x 10
-    type       name      label     value       se     rse fixed diagonal     m     n
- * <chr>      <chr>      <chr>     <dbl>    <dbl>   <dbl> <lgl>    <lgl> <dbl> <dbl>
- 1   the     THETA1       TVCL 26.290000 0.891500 0.03391 FALSE       NA     1    NA
- 2   the     THETA2        TVV  1.348000 0.043810 0.03250 FALSE       NA     2    NA
- 3   the     THETA3       TVKA  4.204000 0.809100 0.19250 FALSE       NA     3    NA
- 4   the     THETA4        LAG  0.208000 0.015710 0.07554 FALSE       NA     4    NA
- 5   the     THETA5  Prop. Err  0.204600 0.022440 0.10970 FALSE       NA     5    NA
- 6   the     THETA6   Add. Err  0.010550 0.003658 0.34660 FALSE       NA     6    NA
- 7   the     THETA7 CRCL on CL  0.007172 0.001697 0.23660 FALSE       NA     7    NA
- 8   ome OMEGA(1,1)     IIV CL  0.270100 0.023270 0.08616 FALSE     TRUE     1     1
- 9   ome OMEGA(2,2)      IIV V  0.195000 0.032040 0.16430 FALSE     TRUE     2     2
-10   ome OMEGA(3,3)     IIV KA  1.381000 0.202100 0.14630 FALSE     TRUE     3     3
-11   sig SIGMA(1,1)             1.000000       NA      NA  TRUE     TRUE     1     1
+ type name label value se rse fixed diagonal m n + * <chr> <chr> <chr> <dbl> <dbl> <dbl> <lgl> <lgl> <dbl> <dbl> + 1 the THETA1 TVCL 26.3 0.892 0.0339 F NA 1.00 NA + 2 the THETA2 TVV 1.35 0.0438 0.0325 F NA 2.00 NA + 3 the THETA3 TVKA 4.20 0.809 0.192 F NA 3.00 NA + 4 the THETA4 LAG 0.208 0.0157 0.0755 F NA 4.00 NA + 5 the THETA5 Prop. Err 0.205 0.0224 0.110 F NA 5.00 NA + 6 the THETA6 Add. Err 0.0106 0.00366 0.347 F NA 6.00 NA + 7 the THETA7 CRCL on CL 0.00717 0.00170 0.237 F NA 7.00 NA + 8 ome OMEGA(1,1) IIV CL 0.270 0.0233 0.0862 F T 1.00 1.00 + 9 ome OMEGA(2,2) IIV V 0.195 0.0320 0.164 F T 2.00 2.00 +10 ome OMEGA(3,3) IIV KA 1.38 0.202 0.146 F T 3.00 3.00 +11 sig SIGMA(1,1) "" 1.00 NA NA T T 1.00 1.00
# Nicely formated table
 prm_table(xpdb, digits = 4)

-The relative standard errors for omega and sigma are reported on the approximate
-standard deviation scale (SE/variance estimate)/2.
+Reporting transformed parameters:
+For the OMEGA and SIGMA matrices, values are reported as standard deviations for the diagonal elements and as correlations for the off-diagonal elements. The relative standard errors (RSE) for OMEGA and SIGMA are reported on the approximate standard deviation scale (SE/variance estimate)/2. Use `transform = FALSE` to report untransformed parameters.
 
 Estimates for $prob no.1, subprob no.0, method foce
  Parameter  Label      Value        RSE
@@ -248,20 +247,20 @@ 

run_sum <- get_summary(xpdb, .problem = 0)
 run_sum
# A tibble: 12 x 5
-   problem subprob               descr       label                         value
-     <dbl>   <dbl>               <chr>       <chr>                         <chr>
- 1       0       0     Run description       descr   NONMEM PK example for xpose
- 2       0       0       Run directory         dir           analysis/models/pk/
- 3       0       0          Run errors      errors                            na
- 4       0       0 ESAMPLE seed number esampleseed                            na
- 5       0       0            Run file        file                    run001.lst
- 6       0       0   Number of ESAMPLE    nesample                            na
- 7       0       0     Reference model         ref                           000
- 8       0       0          Run number         run                        run001
- 9       0       0            Software    software                        nonmem
-10       0       0      Run start time   timestart Mon Oct 16 13:34:28 CEST 2017
-11       0       0       Run stop time    timestop Mon Oct 16 13:34:35 CEST 2017
-12       0       0    Software version     version                         7.3.0
+ problem subprob descr label value + <dbl> <dbl> <chr> <chr> <chr> + 1 0 0 Run description descr NONMEM PK example for xpose + 2 0 0 Run directory dir analysis/models/pk/ + 3 0 0 Run errors errors na + 4 0 0 ESAMPLE seed number esampleseed na + 5 0 0 Run file file run001.lst + 6 0 0 Number of ESAMPLE nesample na + 7 0 0 Reference model ref 000 + 8 0 0 Run number run run001 + 9 0 0 Software software nonmem +10 0 0 Run start time timestart Mon Oct 16 13:34:28 CEST 2017 +11 0 0 Run stop time timestop Mon Oct 16 13:34:35 CEST 2017 +12 0 0 Software version version 7.3.0

diff --git a/docs/articles/bestiarium.html b/docs/articles/bestiarium.html index 65962326..d4d84660 100644 --- a/docs/articles/bestiarium.html +++ b/docs/articles/bestiarium.html @@ -110,7 +110,7 @@

The xpose plots

Benjamin Guiastrennec

-

17 November, 2017

+

28 December, 2017

diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-10-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-10-1.png index fe4fe0da..4e412b0e 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-10-1.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-10-1.png differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-11-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-11-1.png index b05a2025..eca84807 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-11-1.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-4.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-4.png index e531cc53..ebbad932 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-4.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-4.png differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-1.png index 82d76016..4e3af94b 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-2.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-2.png index 8f142de3..1c2fa546 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-2.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-2.png differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-6-1.png index 5533d177..1600fb79 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-1.png index 824f1245..95c7ad47 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-1.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-2.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-2.png index 691b8c9c..6b7cf11d 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-2.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-2.png differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-4.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-4.png index 18f9cfb8..a89466c3 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-4.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-4.png differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-1.png index 2996cedb..c91874cb 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-1.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-1.png differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-2.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-2.png index a9279968..d13f872e 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-2.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-2.png differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-4.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-4.png index 13c00f3a..5ffbe488 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-4.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-4.png differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-9-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-9-1.png index 0ee9bea7..4eea1b20 100644 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-9-1.png and b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/docs/articles/customize_plots.R b/docs/articles/customize_plots.R index a20a508f..fb56b0b6 100644 --- a/docs/articles/customize_plots.R +++ b/docs/articles/customize_plots.R @@ -94,7 +94,10 @@ dv_vs_ipred(xpdb) + xmin = 1, xmax = Inf, ymin = 1, ymax = Inf) -## ----scales demo--------------------------------------------------------- +## ----log-scales demo, warning=FALSE-------------------------------------- +dv_vs_ipred(xpdb, log = 'xy', subtitle = 'Plot on log scale') + +## ----scales-options demo------------------------------------------------- dv_vs_ipred(xpdb, xscale_breaks = c(0.3, 0.8, 1.3), xscale_labels = c('Low', 'Med', 'High'), diff --git a/docs/articles/customize_plots.html b/docs/articles/customize_plots.html index ea693ea8..8d059903 100644 --- a/docs/articles/customize_plots.html +++ b/docs/articles/customize_plots.html @@ -110,7 +110,7 @@

Customize plots

Benjamin Guiastrennec

-

17 November, 2017

+

28 December, 2017

@@ -240,13 +240,16 @@

Scales options

-

The argument log allows to automatically log the relevant axes when set to TRUE. Additional arguments can be provided to the scales via the mapping by using the naming convention xscale_xxx or yscale_xxx where xxx is the name of a ggplot2 scale argument such as name, breaks, labels, expand.

+

The argument log allows to log-transform the axes. Accepted values are x, y or xy.

+
dv_vs_ipred(xpdb, log = 'xy', subtitle = 'Plot on log scale')
+

+

Additional arguments can be provided to the scales via the mapping by using the naming convention xscale_xxx or yscale_xxx where xxx is the name of a ggplot2 scale argument such as name, breaks, labels, expand.

dv_vs_ipred(xpdb, 
             xscale_breaks = c(0.3, 0.8, 1.3),
             xscale_labels = c('Low', 'Med', 'High'),
             xscale_expand = c(0.2, 0),
             xscale_name = 'Individual model predictions')
-

+

diff --git a/docs/articles/customize_plots_files/figure-html/demo gg_theme-1.png b/docs/articles/customize_plots_files/figure-html/demo gg_theme-1.png index db1b659d..6d827830 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo gg_theme-1.png and b/docs/articles/customize_plots_files/figure-html/demo gg_theme-1.png differ diff --git a/docs/articles/customize_plots_files/figure-html/demo mapping-1.png b/docs/articles/customize_plots_files/figure-html/demo mapping-1.png index 2db4a24d..0d99cf68 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo mapping-1.png and b/docs/articles/customize_plots_files/figure-html/demo mapping-1.png differ diff --git a/docs/articles/customize_plots_files/figure-html/demo panels-1.png b/docs/articles/customize_plots_files/figure-html/demo panels-1.png index 77b2b475..639d4903 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo panels-1.png and b/docs/articles/customize_plots_files/figure-html/demo panels-1.png differ diff --git a/docs/articles/customize_plots_files/figure-html/demo panels-2.png b/docs/articles/customize_plots_files/figure-html/demo panels-2.png index a7cb0d9a..558b13e5 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo panels-2.png and b/docs/articles/customize_plots_files/figure-html/demo panels-2.png differ diff --git a/docs/articles/customize_plots_files/figure-html/demo xp_theme-1.png b/docs/articles/customize_plots_files/figure-html/demo xp_theme-1.png index f4f25da4..860b1e2f 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo xp_theme-1.png and b/docs/articles/customize_plots_files/figure-html/demo xp_theme-1.png differ diff --git a/docs/articles/customize_plots_files/figure-html/log-scales demo-1.png b/docs/articles/customize_plots_files/figure-html/log-scales demo-1.png new file mode 100644 index 00000000..63280643 Binary files /dev/null and b/docs/articles/customize_plots_files/figure-html/log-scales demo-1.png differ diff --git a/docs/articles/customize_plots_files/figure-html/scales-options demo-1.png b/docs/articles/customize_plots_files/figure-html/scales-options demo-1.png new file mode 100644 index 00000000..b36d9e3c Binary files /dev/null and b/docs/articles/customize_plots_files/figure-html/scales-options demo-1.png differ diff --git a/docs/articles/faq.html b/docs/articles/faq.html index 5d7a5dc7..110b53e1 100644 --- a/docs/articles/faq.html +++ b/docs/articles/faq.html @@ -110,7 +110,7 @@

Frequently Asked Questions

Benjamin Guiastrennec

-

17 November, 2017

+

28 December, 2017

@@ -119,12 +119,24 @@

17 November, 2017

How do I install xpose?

+
+

+From CRAN (latest stable release)

+
    +
  1. Install/update xpose with the following command:
    install.packages('xpose') +
  2. +
+
+
+

+From github (current development version)

  1. Make sure you have the devtools package installed
  2. Install/update xpose with the following command:
    devtools::install_github('UUPharmacometrics/xpose')
+

Are xpose and xpose4 cross compatible packages?

@@ -139,7 +151,8 @@

How do I suggest an idea for a future version of xpose?

    -
  1. Check on github if this idea has not been discussed already
  2. +
  3. Check on github that this idea has not yet been discussed
  4. +
  5. Read the CONTRIBUTING.md document
  6. Open a new issue on github describing your idea
@@ -148,8 +161,8 @@

How do I report a bug found in xpose?

  1. Make sure you are running the latest version of xpose
  2. -
  3. Check on github if this issue has not been reported before
  4. -
  5. Create a minimal reproductive example (reprex) of your issue
  6. +
  7. Check on github that this issue has not yet been reported
  8. +
  9. Read the CONTRIBUTING.md document
  10. Open a new issue on github
diff --git a/docs/articles/import_model_outputs.html b/docs/articles/import_model_outputs.html index cb8923dd..a3e63286 100644 --- a/docs/articles/import_model_outputs.html +++ b/docs/articles/import_model_outputs.html @@ -110,7 +110,7 @@

Import model outputs

Benjamin Guiastrennec

-

17 November, 2017

+

28 December, 2017

diff --git a/docs/articles/index.html b/docs/articles/index.html index e659c3a5..facd52ca 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -127,7 +127,7 @@
diff --git a/docs/articles/interactive_plots.html b/docs/articles/interactive_plots.html index e261e63b..8404fde0 100644 --- a/docs/articles/interactive_plots.html +++ b/docs/articles/interactive_plots.html @@ -112,7 +112,7 @@

Creating interactive plots

Benjamin Guiastrennec

-

17 November, 2017

+

28 December, 2017

@@ -153,8 +153,8 @@

Convert the plot from ggplot2 to plotly

The ggplot2 object is now automatically converted to a plotly graph. The scales can now be changed interactively, groups can be hidden by clicking on the legend

plotly::ggplotly(gof_plot)
-
- +
+

@@ -165,8 +165,8 @@

xpdb_ex_pk %>% 
   eta_distrib(title = 'Eta distribution') %>% 
   plotly::ggplotly()
-
- +
+

@@ -175,8 +175,8 @@

vpc_data() %>% vpc(title = 'Visual predictive checks', type = 'alpr') %>% plotly::ggplotly()

-
- +
+ diff --git a/docs/articles/introduction.html b/docs/articles/introduction.html index f78a4f54..303d1d28 100644 --- a/docs/articles/introduction.html +++ b/docs/articles/introduction.html @@ -110,7 +110,7 @@

Introduction

Benjamin Guiastrennec

-

17 November, 2017

+

28 December, 2017

@@ -193,8 +193,8 @@

A table of parameter estimates can be displayed to the console by using the prm_table() function on an xpdb object.

prm_table(xpdb)

-The relative standard errors for omega and sigma are reported on the approximate
-standard deviation scale (SE/variance estimate)/2.
+Reporting transformed parameters:
+For the OMEGA and SIGMA matrices, values are reported as standard deviations for the diagonal elements and as correlations for the off-diagonal elements. The relative standard errors (RSE) for OMEGA and SIGMA are reported on the approximate standard deviation scale (SE/variance estimate)/2. Use `transform = FALSE` to report untransformed parameters.
 
 Estimates for $prob no.1, subprob no.0, method foce
  Parameter  Label      Value        RSE
diff --git a/docs/articles/multiple_pages.html b/docs/articles/multiple_pages.html
index 714b8589..e2954b14 100644
--- a/docs/articles/multiple_pages.html
+++ b/docs/articles/multiple_pages.html
@@ -110,7 +110,7 @@
       

Plots with multiple pages

Benjamin Guiastrennec

-

17 November, 2017

+

28 December, 2017

diff --git a/docs/articles/multiple_pages_files/figure-html/demo panels-1.png b/docs/articles/multiple_pages_files/figure-html/demo panels-1.png index eeedbec3..900192e9 100644 Binary files a/docs/articles/multiple_pages_files/figure-html/demo panels-1.png and b/docs/articles/multiple_pages_files/figure-html/demo panels-1.png differ diff --git a/docs/articles/multiple_pages_files/figure-html/demo panels-2.png b/docs/articles/multiple_pages_files/figure-html/demo panels-2.png index a7cb0d9a..558b13e5 100644 Binary files a/docs/articles/multiple_pages_files/figure-html/demo panels-2.png and b/docs/articles/multiple_pages_files/figure-html/demo panels-2.png differ diff --git a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-2-1.png index 9b32b0e0..730a795a 100644 Binary files a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-2-1.png and b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-2-1.png differ diff --git a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-2-2.png b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-2-2.png index 5a09e143..bd3ecf29 100644 Binary files a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-2-2.png and b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-2-2.png differ diff --git a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-3-1.png b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-3-1.png index 9b32b0e0..730a795a 100644 Binary files a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-3-1.png and b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-3-1.png differ diff --git a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-5-1.png index daf63251..0871fb97 100644 Binary files a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-6-1.png index 5004235d..dce5aa11 100644 Binary files a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/articles/vpc.html b/docs/articles/vpc.html index fc899aba..a322e070 100644 --- a/docs/articles/vpc.html +++ b/docs/articles/vpc.html @@ -110,7 +110,7 @@

Visual Predictive Checks (VPC)

Benjamin Guiastrennec

-

17 November, 2017

+

28 December, 2017

diff --git a/docs/articles/vpc_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/vpc_files/figure-html/unnamed-chunk-2-1.png index 432361b6..d9605383 100644 Binary files a/docs/articles/vpc_files/figure-html/unnamed-chunk-2-1.png and b/docs/articles/vpc_files/figure-html/unnamed-chunk-2-1.png differ diff --git a/docs/articles/vpc_files/figure-html/unnamed-chunk-3-1.png b/docs/articles/vpc_files/figure-html/unnamed-chunk-3-1.png index 432361b6..d9605383 100644 Binary files a/docs/articles/vpc_files/figure-html/unnamed-chunk-3-1.png and b/docs/articles/vpc_files/figure-html/unnamed-chunk-3-1.png differ diff --git a/docs/articles/vpc_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/vpc_files/figure-html/unnamed-chunk-4-1.png index 1c487a7f..5fda11d7 100644 Binary files a/docs/articles/vpc_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/vpc_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/vpc_files/figure-html/unnamed-chunk-4-2.png b/docs/articles/vpc_files/figure-html/unnamed-chunk-4-2.png index e6bed5cb..b90fe313 100644 Binary files a/docs/articles/vpc_files/figure-html/unnamed-chunk-4-2.png and b/docs/articles/vpc_files/figure-html/unnamed-chunk-4-2.png differ diff --git a/docs/articles/vpc_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/vpc_files/figure-html/unnamed-chunk-5-1.png index 8ea0b957..52ae8d61 100644 Binary files a/docs/articles/vpc_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/vpc_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/vpc_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/vpc_files/figure-html/unnamed-chunk-6-1.png index 432361b6..d9605383 100644 Binary files a/docs/articles/vpc_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/vpc_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/index.html b/docs/index.html index 16de5dd9..ac9452eb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -297,6 +297,7 @@

Dev status

  • appveyor status
  • cran_version
  • codecov
  • +
  • downloads
  • diff --git a/docs/man/figures/readme_example_figure_2-1.png b/docs/man/figures/readme_example_figure_2-1.png index 276118cc..45090934 100644 Binary files a/docs/man/figures/readme_example_figure_2-1.png and b/docs/man/figures/readme_example_figure_2-1.png differ diff --git a/docs/man/figures/readme_example_figure_3-1.png b/docs/man/figures/readme_example_figure_3-1.png index ebac3a1f..64aaca69 100644 Binary files a/docs/man/figures/readme_example_figure_3-1.png and b/docs/man/figures/readme_example_figure_3-1.png differ diff --git a/docs/man/figures/readme_example_figure_4-1.png b/docs/man/figures/readme_example_figure_4-1.png index b9b52b67..ea643d86 100644 Binary files a/docs/man/figures/readme_example_figure_4-1.png and b/docs/man/figures/readme_example_figure_4-1.png differ diff --git a/docs/man/figures/readme_example_figure_5-1.png b/docs/man/figures/readme_example_figure_5-1.png index b8c67398..ba354f96 100644 Binary files a/docs/man/figures/readme_example_figure_5-1.png and b/docs/man/figures/readme_example_figure_5-1.png differ diff --git a/docs/news/index.html b/docs/news/index.html index a41358a9..27b394ae 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -134,13 +134,31 @@

    Change log All releases

    -
    +

    -xpose 0.4.0

    +xpose 0.4.1

    General

      +
    • Improved integration of the xpose.nlmixr package
    • +
    • Prevented a problem in the print() function with the upcoming ggplot2 version
    • +
    • Fixed bug in summary() where missing estimation method was reported if NM code written as METH=… instead of METHOD=…
    • +
    • Fixed bug where labels in prm_table(), get_prm() were missing with a commented row in $THETA, $OMEGA or $SIGMA
    • +
    • Fixed bug in prm_table(), get_prm() where only NA would be reported when missing the -1000000006 record in the .ext file (i.e. NM <7.3)
    • +
    • Improved description of the prm_table() output
    • +
    • Fixed bug in ind_plots() where the aesthetics would get mixed up if the variable names were changed
    • +
    • Small fixes to vignettes, documentations and website
    • +
    +
    + +
    +

    +xpose 0.4.0

    +
    +

    +General

    +
    • Added xpdb memory usage to print.xpose_data()
    • Replaced print.prm.data() to prm_table() @@ -184,9 +202,9 @@

      xpose 0.3.0

      -
      +

      -General

      +General

      • Improved documentation and testing
      • Improved compatibility with NONMEM 7.4.1
      • @@ -230,9 +248,9 @@

        xpose 0.2.0

        -
        +

        -General

        +General

        • Renamed package xpose
        • @@ -335,6 +353,7 @@

          Contents