-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from metrumresearchgroup/develop
release/0.3.3
- Loading branch information
Showing
287 changed files
with
1,315 additions
and
18,565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
docs | ||
test.R | ||
inst/examples/*.html | ||
Rplots.pdf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
--- | ||
output: github_document | ||
--- | ||
|
||
<!-- README.md is generated from README.Rmd. Please edit that file --> | ||
|
||
```{r, include = FALSE} | ||
knitr::opts_chunk$set( | ||
collapse = TRUE, | ||
comment = ".", | ||
fig.path = "man/figures/README-", | ||
warning = FALSE, | ||
message = FALSE, | ||
fig.width = 5, | ||
fig.height = 4 | ||
) | ||
``` | ||
|
||
# pmplots <img align="right" src = "man/figures/metrum_pmplots_git_logo.png" width="135px"> | ||
|
||
<!-- badges: start --> | ||
<!-- badges: end --> | ||
|
||
The goal of pmplots is to create exploratory and diagnostic plots commonly | ||
used in pharmacometrics. | ||
|
||
## Installation | ||
|
||
You can install the released version of pmplots from [MPN](https://mpn.metworx.com/docs/) with: | ||
|
||
```{r, eval = FALSE} | ||
mpn <- "https://mpn.metworx.com/snapshots/stable/2021-06-20" | ||
install.packages("pmplots", repos = mpn) | ||
``` | ||
|
||
This installs from a specific, dated snapshot. Please check | ||
https://mpn.metworx.com/docs/snapshots/ for the most recent snapshot date. | ||
|
||
You can install the development version from [GitHub](https://github.com/) with: | ||
|
||
``` r | ||
# install.packages("devtools") | ||
devtools::install_github("metrumresearchgroup/pmplots") | ||
``` | ||
|
||
|
||
## Examples | ||
|
||
```{r, message = FALSE, warning = FALSE} | ||
library(pmplots) | ||
library(dplyr) | ||
data <- pmplots_data_obs() | ||
``` | ||
|
||
|
||
The default pmplots behavior is to expect names following NONMEM convention, | ||
for example `DV` refers to observed values, `PRED` refers to population | ||
predicted values. With that convention, we can easily make observed versus | ||
predicted plots | ||
|
||
```{r, dv_pred} | ||
dv_pred(data, yname = "MyDrug (ng/ml)") | ||
``` | ||
|
||
```{r, dv_pred_log} | ||
dv_pred(data, loglog = TRUE) | ||
``` | ||
|
||
|
||
## NPDE plots | ||
```{r, npde_time} | ||
npde_time(data) | ||
``` | ||
|
||
```{r, npde_pred} | ||
npde_pred(data) | ||
``` | ||
|
||
|
||
## QQ plots | ||
```{r, cwres_q} | ||
cwres_q(data) | ||
``` | ||
|
||
|
||
## Exploratory plots | ||
|
||
```{r, cont_cat, fig.height = 5, fig.width = 7} | ||
id <- pmplots_data_id() | ||
cont_cat(id, x = "STUDYc", y = c("WT", "SCR", "AAG")) %>% pm_grid() | ||
``` | ||
|
||
```{r, pairs, fig.width = 4.5, fig.width = 6} | ||
pairs_plot(id, y = c("WT//Weight (kg)", "SCR//Creat (mg/dL)", "BMI//BMI (kg/m2)")) | ||
``` | ||
|
||
## Some faceted versions | ||
|
||
```{r, facet_example, fig.height = 5, fig.width = 7} | ||
wrap_cont_time(data, y = c("RES","WRES", "CWRES", "NPDE"), ncol = 2) | ||
``` | ||
|
||
|
||
# Function and workflow overview | ||
|
||
A functions and features (code + output) listing is available at | ||
[pmplots_complete.md](https://github.com/metrumresearchgroup/pmplots/blob/master/inst/examples/pmplots_complete.md). | ||
|
||
# Suggested packages | ||
|
||
Consider installing the [cowplot](https://CRAN.R-project.org/package=cowplot) | ||
package to help arranging plots on a page. Also, consider installing | ||
[latex2exp](https://CRAN.R-project.org/package=latex2exp) to allow you to | ||
use latex in axis titles. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,116 @@ | ||
pmplots | ||
================ | ||
|
||
## Browse source code at | ||
https://github.com/metrumresearchgroup/pmplots | ||
<!-- README.md is generated from README.Rmd. Please edit that file --> | ||
|
||
# pmplots <img align="right" src = "man/figures/metrum_pmplots_git_logo.png" width="135px"> | ||
|
||
<!-- badges: start --> | ||
<!-- badges: end --> | ||
|
||
The goal of pmplots is to create exploratory and diagnostic plots | ||
commonly used in pharmacometrics. | ||
|
||
## Installation | ||
|
||
TODO(devin) pmplots is available on MPN | ||
You can install the released version of pmplots from | ||
[MPN](https://mpn.metworx.com/docs/) with: | ||
|
||
``` r | ||
mpn <- "https://mpn.metworx.com/snapshots/stable/2021-06-20" | ||
install.packages("pmplots", repos = mpn) | ||
``` | ||
|
||
This installs from a specific, dated snapshot. Please check | ||
<https://mpn.metworx.com/docs/snapshots/> for the most recent snapshot | ||
date. | ||
|
||
You can install the development version from | ||
[GitHub](https://github.com/) with: | ||
|
||
``` r | ||
# install.packages("devtools") | ||
devtools::install_github("metrumresearchgroup/pmplots") | ||
``` | ||
|
||
## Examples | ||
|
||
``` r | ||
library(pmplots) | ||
library(dplyr) | ||
|
||
data <- pmplots_data_obs() | ||
``` | ||
|
||
The default pmplots behavior is to expect names following NONMEM | ||
convention, for example `DV` refers to observed values, `PRED` refers to | ||
population predicted values. With that convention, we can easily make | ||
observed versus predicted plots | ||
|
||
``` r | ||
dv_pred(data, yname = "MyDrug (ng/ml)") | ||
``` | ||
|
||
![](man/figures/README-dv_pred-1.png)<!-- --> | ||
|
||
``` r | ||
dv_pred(data, loglog = TRUE) | ||
``` | ||
|
||
![](man/figures/README-dv_pred_log-1.png)<!-- --> | ||
|
||
## NPDE plots | ||
|
||
``` r | ||
npde_time(data) | ||
``` | ||
|
||
![](man/figures/README-npde_time-1.png)<!-- --> | ||
|
||
``` r | ||
npde_pred(data) | ||
``` | ||
|
||
![](man/figures/README-npde_pred-1.png)<!-- --> | ||
|
||
## QQ plots | ||
|
||
``` r | ||
cwres_q(data) | ||
``` | ||
|
||
![](man/figures/README-cwres_q-1.png)<!-- --> | ||
|
||
## Exploratory plots | ||
|
||
``` r | ||
id <- pmplots_data_id() | ||
cont_cat(id, x = "STUDYc", y = c("WT", "SCR", "AAG")) %>% pm_grid() | ||
``` | ||
|
||
![](man/figures/README-cont_cat-1.png)<!-- --> | ||
|
||
## News | ||
``` r | ||
pairs_plot(id, y = c("WT//Weight (kg)", "SCR//Creat (mg/dL)", "BMI//BMI (kg/m2)")) | ||
``` | ||
|
||
News can be found [here](news.md) | ||
![](man/figures/README-pairs-1.png)<!-- --> | ||
|
||
## Function and workflow overview | ||
## Some faceted versions | ||
|
||
A functions and features (code + output) listing is available at | ||
[pmplots_complete.md](https://github.com/metrumresearchgroup/pmplots/blob/master/inst/examples/pmplots_complete.md). | ||
``` r | ||
wrap_cont_time(data, y = c("RES","WRES", "CWRES", "NPDE"), ncol = 2) | ||
``` | ||
|
||
## Vignettes | ||
![](man/figures/README-facet_example-1.png)<!-- --> | ||
|
||
- [Get started](https://metrumresearchgroup.github.io/pmplots/articles/start.html) | ||
- [Customize your plot](https://metrumresearchgroup.github.io/pmplots/articles/customize.html) | ||
- [Residual plots](https://metrumresearchgroup.github.io/pmplots/articles/residual_plots.html) | ||
- [NPDE plots](https://metrumresearchgroup.github.io/pmplots/articles/npde_plots.html) | ||
- [Dependent variable plots](https://metrumresearchgroup.github.io/pmplots/articles/dv.html) | ||
- [ETA plots](https://metrumresearchgroup.github.io/pmplots/articles/eta.html) | ||
- [Vectorized plots](https://metrumresearchgroup.github.io/pmplots/articles/list_plots.html) | ||
- [Wrapped or faceted plots](https://metrumresearchgroup.github.io/pmplots/articles/wrapped_plots.html) | ||
# Function and workflow overview | ||
|
||
## Suggested packages | ||
A functions and features (code + output) listing is available at | ||
[pmplots\_complete.md](https://github.com/metrumresearchgroup/pmplots/blob/master/inst/examples/pmplots_complete.md). | ||
|
||
Consider installing the [cowplot](https://CRAN.R-project.org/package=cowplot) | ||
package to help arranging plots on a page. Also, consider installing | ||
[latex2exp](https://CRAN.R-project.org/package=latex2exp) to allow you to | ||
use latex in axis titles. | ||
# Suggested packages | ||
|
||
Consider installing the | ||
[cowplot](https://CRAN.R-project.org/package=cowplot) package to help | ||
arranging plots on a page. Also, consider installing | ||
[latex2exp](https://CRAN.R-project.org/package=latex2exp) to allow you | ||
to use latex in axis titles. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
development: | ||
mode: auto | ||
title: pmplots | ||
navbar: | ||
right: | ||
- icon: fa-github fa-lg | ||
href: https://github.com/metrumresearchgroup/pmplots |
Oops, something went wrong.