Skip to content

Commit

Permalink
Merge pull request #148 from UUPharmacometrics/dev
Browse files Browse the repository at this point in the history
Update master to 0.4.4
  • Loading branch information
Benjamin authored Mar 18, 2019
2 parents 4bf7ff9 + c15d1b3 commit 4187bf5
Show file tree
Hide file tree
Showing 612 changed files with 3,421 additions and 3,226 deletions.
Empty file modified .Rbuildignore
100644 → 100755
Empty file.
Empty file modified .gitattributes
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions .github/CODE_OF_CONDUCT.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai

## 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]
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/
202 changes: 0 additions & 202 deletions .github/CONTRIBUTING.html

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To contribute code to xpose please carefully follow the steps listed below.
1. [Fork](https://github.com/UUPharmacometrics/xpose/fork) the xpose repository.
1. Make the changes to the code on your fork.

+ Use the tidyverse [coding style](http://style.tidyverse.org/).
+ Use the tidyverse [coding style](https://style.tidyverse.org/).
+ 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.
Expand Down
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .travis.yml
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions DESCRIPTION
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: xpose
Type: Package
Title: Diagnostics for Pharmacometric Models
Version: 0.4.3
Version: 0.4.4
Authors@R: c(
person('Benjamin', 'Guiastrennec',
role = c('aut', 'cre', 'cph'),
Expand Down Expand Up @@ -53,4 +53,4 @@ BugReports: https://github.com/UUPharmacometrics/xpose/issues
Encoding: UTF-8
LazyData: true
VignetteBuilder: knitr
RoxygenNote: 6.1.0
RoxygenNote: 6.1.1
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified NAMESPACE
100644 → 100755
Empty file.
11 changes: 9 additions & 2 deletions NEWS.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# xpose 0.4.4
### General
* Improved documentation for `xpose_data` (@billdenney #99)
* Fixed VPC error in the documentation (@callistosp #130)
* Fixed bug leading to errors when plotting poorly formatted ETA name (@romainfrancois #127)
* Compatibility improvements

# xpose 0.4.3
### General
* Fixed bug in `get_prm()`/`prm_table()` where off diagonal correlations were improperly computed.
Expand Down Expand Up @@ -117,7 +124,7 @@
* Proof of concept pre-release around simple goodness-of-fit functions like `dv_vs_ipred()`

### Definition of core functions and workflow
* Defined the `xpose_geom()` core function to specifically direct arguments to [`ggplot2`](http://ggplot2.tidyverse.org) layers
* Defined the `xpose_geom()` core function to specifically direct arguments to [`ggplot2`](https://ggplot2.tidyverse.org) layers
* Defined the concept of template titles
* Define the templates for `xpose_theme()`
* Makes use of the [`tidyverse`](http://tidyverse.org) and pipes `%>%`
* Makes use of the [`tidyverse`](https://tidyverse.org) and pipes `%>%`
Empty file modified R/examples.R
100644 → 100755
Empty file.
Empty file modified R/fetch_data.R
100644 → 100755
Empty file.
Empty file modified R/list_nm_tables.R
100644 → 100755
Empty file.
Empty file modified R/manual_import.R
100644 → 100755
Empty file.
Empty file modified R/plot_amt.R
100644 → 100755
Empty file.
Empty file modified R/plot_distribution.R
100644 → 100755
Empty file.
Empty file modified R/plot_gof.R
100644 → 100755
Empty file.
Empty file modified R/plot_individuals.R
100644 → 100755
Empty file.
Empty file modified R/plot_minimization.R
100644 → 100755
Empty file.
Empty file modified R/plot_qq.R
100644 → 100755
Empty file.
Empty file modified R/plot_residuals.R
100644 → 100755
Empty file.
Empty file modified R/plot_spaghetti.R
100644 → 100755
Empty file.
Empty file modified R/plot_vpc.R
100644 → 100755
Empty file.
Empty file modified R/print_xpose_data.R
100644 → 100755
Empty file.
Empty file modified R/print_xpose_plot.R
100644 → 100755
Empty file.
Empty file modified R/prm_table.R
100644 → 100755
Empty file.
Empty file modified R/read_nm_files.R
100644 → 100755
Empty file.
Empty file modified R/read_nm_model.R
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion R/read_nm_tables.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ read_funs <- function(fun) {
#' @param x A list containing a the 3 first records of a
#' dataset under `[[1]]`.
#' @param quiet Should messages be displayed to the console.
#' @param col_types Defines the type of each to be passed to
#' @param col_types Defines the type of each column to be passed to
#' the `readr` import function.
#' @param na Character string defining the values to be treated as `NA`.
#' @param comment Character string defining the value to mark comments.
Expand Down
Empty file modified R/summarise_nm_model.R
100644 → 100755
Empty file.
Empty file modified R/summary_xpose_data.R
100644 → 100755
Empty file.
Empty file modified R/template_titles.R
100644 → 100755
Empty file.
Empty file modified R/themes_gg.R
100644 → 100755
Empty file.
Empty file modified R/themes_xp.R
100644 → 100755
Empty file.
Empty file modified R/transform_parameters.R
100644 → 100755
Empty file.
Empty file modified R/update_themes.R
100644 → 100755
Empty file.
Empty file modified R/utils.R
100644 → 100755
Empty file.
Empty file modified R/vars_list.R
100644 → 100755
Empty file.
Empty file modified R/vars_set.R
100644 → 100755
Empty file.
Empty file modified R/vpc_data.R
100644 → 100755
Empty file.
Empty file modified R/vpc_helpers.R
100644 → 100755
Empty file.
Empty file modified R/xpdb_access.R
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions R/xpdb_edits.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ edit_xpose_data <- function(.fun, .fname, .data, ..., .problem, .source, .where)

# do dplyr operation outside of mutate to avoid problems with n()
xpdb[['data']]$data <- purrr::map_if(xpdb[['data']]$data, xpdb[['data']]$problem %in% .problem,
.f = .fun, rlang::UQS(rlang::quos(...)))
.f = .fun, !!!rlang::quos(...))
xpdb[['data']] <- xpdb[['data']] %>%
dplyr::mutate(modified = dplyr::if_else(.$problem %in% .problem, TRUE, .$modified))

Expand Down Expand Up @@ -221,7 +221,7 @@ edit_xpose_data <- function(.fun, .fname, .data, ..., .problem, .source, .where)
} else {
stop('edits of `', .x$method, '` data are not yet supported in xpose.', call. = FALSE)
}
}, .fun = .fun, .where = .where, rlang::UQS(rlang::quos(...)))
}, .fun = .fun, .where = .where, !!!rlang::quos(...))

xpdb[['special']] <- tidyr::unnest(xpdb[['special']])
} else {
Expand All @@ -240,7 +240,7 @@ edit_xpose_data <- function(.fun, .fname, .data, ..., .problem, .source, .where)

xpdb[['files']]$data <- purrr::map_if(.x = xpdb[['files']]$data, .p = xpdb[['files']]$problem %in% .problem &
xpdb[['files']]$extension %in% .source,
.f = .fun, rlang::UQS(rlang::quos(...)))
.f = .fun, !!!rlang::quos(...))
xpdb[['files']] <- xpdb[['files']] %>%
dplyr::mutate(modified = dplyr::if_else(.$problem %in% .problem & .$extension %in% .source, TRUE, .$modified))
}
Expand Down
Empty file modified R/xpdb_list.R
100644 → 100755
Empty file.
Empty file modified R/xplot_distrib.R
100644 → 100755
Empty file.
Empty file modified R/xplot_helpers.R
100644 → 100755
Empty file.
Empty file modified R/xplot_qq.R
100644 → 100755
Empty file.
Empty file modified R/xplot_scatter.R
100644 → 100755
Empty file.
Empty file modified R/xpose.R
100644 → 100755
Empty file.
14 changes: 7 additions & 7 deletions R/xpose_data.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ xpose_data <- function(runno = NULL,
structure(class = c('xpose_data', 'uneval'))
}

#' Allow assignment into xpose_data without conversion to class uneval
`[[<-.xpose_data` <- function(x, i, value) {
x <- unclass(x)
x[[i]] <- value
as.xpdb(x)
}
`$<-.xpose_data` <- `[[<-.xpose_data`
# Allow assignment into xpose_data without conversion to class uneval
# `[[<-.xpose_data` <- function(x, i, value) {
# x <- unclass(x)
# x[[i]] <- value
# as.xpdb(x)
# }
# `$<-.xpose_data` <- `[[<-.xpose_data`
Empty file modified R/xpose_geom.R
100644 → 100755
Empty file.
Empty file modified R/xpose_save.R
100644 → 100755
Empty file.
4 changes: 1 addition & 3 deletions R/zzz.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

if (!interactive()) return()

text <- c('The xpose is under active development, for updates checkout:\nhttps://UUPharmacometrics.github.io/xpose',
'Need a new plot? Suggest ideas for the new xpose on github:\nhttps://github.com/UUPharmacometrics/xpose',
'Do you like the new xpose? Give us some feedback on github:\nhttps://github.com/UUPharmacometrics/xpose')
text <- c('Note: the next xpose release (v0.5) will bring some major changes.\nIf you rely on xpose for your work, please keep an eye on our github:\nhttps://github.com/UUPharmacometrics/xpose')

packageStartupMessage(sample(text, size = 1))
}
Expand Down
9 changes: 4 additions & 5 deletions README.Rmd
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,22 @@ library(xpose)
xpdb <- xpdb_ex_pk
xpdb$options$quiet <- TRUE
xpdb <- as.xpdb(xpdb)
knitr::opts_chunk$set(fig.path = 'man/figures/',
fig.dpi = 96,
fig.height = 4,
fig.width = 4,
out.width = '50%',
fig.align = 'center',
dev = 'png',
dev.args = list(type = 'cairo'))
fig.align = 'center')
```

# xpose <a href="https://UUPharmacometrics.github.io/xpose/"><img src="man/figures/logo.png" align="right" /></a>

[![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)](https://CRAN.R-project.org/package=xpose)
[![cran_version](https://www.r-pkg.org/badges/version/xpose)](https://CRAN.R-project.org/package=xpose)
[![codecov](https://codecov.io/gh/UUPharmacometrics/xpose/branch/master/graph/badge.svg)](https://codecov.io/gh/UUPharmacometrics/xpose)
[![Lifecycle Status](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/)
[![downloads](https://cranlogs.r-pkg.org/badges/grand-total/xpose)](https://CRAN.R-project.org/package=xpose)
Expand Down Expand Up @@ -101,7 +100,7 @@ The [xpose website](https://UUPharmacometrics.github.io/xpose/) contains several

When working with xpose, a working knowledge of ggplot2 is recommended. Help for ggplot2 can be found in:

- The ggplot2 [documentation](http://docs.ggplot2.org/current/)
- The ggplot2 [documentation](https://docs.ggplot2.org/current/)
- The ggplot2 [mailing list](https://groups.google.com/forum/?fromgroups#!forum/ggplot2)
- Internet resources (stack overflow, etc.)

Expand Down
128 changes: 71 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->
xpose <a href="https://UUPharmacometrics.github.io/xpose/"><img src="man/figures/logo.png" align="right" /></a>
===============================================================================================================

[![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)](https://CRAN.R-project.org/package=xpose) [![codecov](https://codecov.io/gh/UUPharmacometrics/xpose/branch/master/graph/badge.svg)](https://codecov.io/gh/UUPharmacometrics/xpose) [![Lifecycle Status](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/) [![downloads](https://cranlogs.r-pkg.org/badges/grand-total/xpose)](https://CRAN.R-project.org/package=xpose)
# xpose <a href="https://UUPharmacometrics.github.io/xpose/"><img src="man/figures/logo.png" align="right" /></a>

Overview
--------
[![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](https://www.r-pkg.org/badges/version/xpose)](https://CRAN.R-project.org/package=xpose)
[![codecov](https://codecov.io/gh/UUPharmacometrics/xpose/branch/master/graph/badge.svg)](https://codecov.io/gh/UUPharmacometrics/xpose)
[![Lifecycle
Status](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/)
[![downloads](https://cranlogs.r-pkg.org/badges/grand-total/xpose)](https://CRAN.R-project.org/package=xpose)

[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.
## Overview

Installation
------------
[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.

## Installation

``` r
# Install the lastest release from the CRAN
Expand All @@ -22,8 +31,7 @@ install.packages('xpose')
devtools::install_github('UUPharmacometrics/xpose')
```

Getting started
---------------
## Getting started

### Load xpose

Expand Down Expand Up @@ -60,43 +68,45 @@ xpdb
summary(xpdb, problem = 1)
```


Summary for problem no. 0 [Global information]
- Software @software : nonmem
- Software version @version : 7.3.0
- Run directory @dir : analysis/models/pk/
- Run file @file : run001.lst
- Run number @run : run001
- Reference model @ref : 000
- Run description @descr : NONMEM PK example for xpose
- Run start time @timestart : Mon Oct 16 13:34:28 CEST 2017
- Run stop time @timestop : Mon Oct 16 13:34:35 CEST 2017

Summary for problem no. 1 [Parameter estimation]
- Input data @data : ../../mx19_2.csv
- Number of individuals @nind : 74
- Number of observations @nobs : 476
- ADVAN @subroutine : 2
- Estimation method @method : foce-i
- Termination message @term : MINIMIZATION SUCCESSFUL
- Estimation runtime @runtime : 00:00:02
- Objective function value @ofv : -1403.905
- Number of significant digits @nsig : 3.3
- Covariance step runtime @covtime : 00:00:03
- Condition number @condn : 21.5
- Eta shrinkage @etashk : 9.3 [1], 28.7 [2], 23.7 [3]
- Epsilon shrinkage @epsshk : 14.9 [1]
- Run warnings @warnings : (WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION.

Summary for problem no. 2 [Model simulations]
- Input data @data : ../../mx19_2.csv
- Number of individuals @nind : 74
- Number of observations @nobs : 476
- Estimation method @method : sim
- Number of simulations @nsim : 20
- Simulation seed @simseed : 221287
- Run warnings @warnings : (WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION.
(WARNING 22) WITH $MSFI AND "SUBPROBS", "TRUE=FINAL" ...
```
Summary for problem no. 0 [Global information]
- Software @software : nonmem
- Software version @version : 7.3.0
- Run directory @dir : analysis/models/pk/
- Run file @file : run001.lst
- Run number @run : run001
- Reference model @ref : 000
- Run description @descr : NONMEM PK example for xpose
- Run start time @timestart : Mon Oct 16 13:34:28 CEST 2017
- Run stop time @timestop : Mon Oct 16 13:34:35 CEST 2017
Summary for problem no. 1 [Parameter estimation]
- Input data @data : ../../mx19_2.csv
- Number of individuals @nind : 74
- Number of observations @nobs : 476
- ADVAN @subroutine : 2
- Estimation method @method : foce-i
- Termination message @term : MINIMIZATION SUCCESSFUL
- Estimation runtime @runtime : 00:00:02
- Objective function value @ofv : -1403.905
- Number of significant digits @nsig : 3.3
- Covariance step runtime @covtime : 00:00:03
- Condition number @condn : 21.5
- Eta shrinkage @etashk : 9.3 [1], 28.7 [2], 23.7 [3]
- Epsilon shrinkage @epsshk : 14.9 [1]
- Run warnings @warnings : (WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION.
Summary for problem no. 2 [Model simulations]
- Input data @data : ../../mx19_2.csv
- Number of individuals @nind : 74
- Number of observations @nobs : 476
- Estimation method @method : sim
- Number of simulations @nsim : 20
- Simulation seed @simseed : 221287
- Run warnings @warnings : (WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION.
(WARNING 22) WITH $MSFI AND "SUBPROBS", "TRUE=FINAL" ...
```

### Generate diagnostics

Expand Down Expand Up @@ -142,18 +152,22 @@ prm_vs_iteration(xpdb, labeller = 'label_value')

<img src="man/figures/readme_example_figure_5-1.png" width="75%" style="display: block; margin: auto;" />

Recommended reading
-------------------
## Recommended reading

The [xpose website](https://UUPharmacometrics.github.io/xpose/) contains several useful articles to make full use of xpose
The [xpose website](https://UUPharmacometrics.github.io/xpose/) contains
several useful articles to make full use of xpose

When working with xpose, a working knowledge of ggplot2 is recommended. Help for ggplot2 can be found in:
When working with xpose, a working knowledge of ggplot2 is recommended.
Help for ggplot2 can be found in:

- The ggplot2 [documentation](http://docs.ggplot2.org/current/)
- The ggplot2 [mailing list](https://groups.google.com/forum/?fromgroups#!forum/ggplot2)
- Internet resources (stack overflow, etc.)
- The ggplot2 [documentation](https://docs.ggplot2.org/current/)
- The ggplot2 [mailing
list](https://groups.google.com/forum/?fromgroups#!forum/ggplot2)
- Internet resources (stack overflow, etc.)

Contribute
----------
## Contribute

Please note that the xpose project is released with a [Contributor Code of Conduct](.github/CODE_OF_CONDUCT.md) and [contributing guidelines](.github/CONTRIBUTING.md). By contributing to this project, you agree to abide these.
Please note that the xpose project is released with a [Contributor Code
of Conduct](.github/CODE_OF_CONDUCT.md) and [contributing
guidelines](.github/CONTRIBUTING.md). By contributing to this project,
you agree to abide these.
8 changes: 5 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ init:
install:
ps: Bootstrap

# Adapt as necessary starting from here

cache:
- packages -> appveyor.yml
- C:\RLibrary

# Adapt as necessary starting from here
environment:
USE_RTOOLS: true

build_script:
- travis-tool.sh install_deps
Expand Down
Empty file modified data-raw/xpdb_ex_pk.R
100644 → 100755
Empty file.
Empty file modified data/xpdb_ex_pk.rda
100644 → 100755
Empty file.
Loading

0 comments on commit 4187bf5

Please sign in to comment.