diff --git a/DESCRIPTION b/DESCRIPTION index fe63926d..f8b5b2f4 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: xpose Type: Package Title: Diagnostics for Pharmacometric Models -Version: 0.4.8 +Version: 0.4.9 Authors@R: c( person('Benjamin', 'Guiastrennec', role = c('aut', 'cre', 'cph'), diff --git a/NEWS.md b/NEWS.md index fdf88940..31491c1a 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +# xpose 0.4.9 +* Compatibility fix for dplyr 1.0.0 and vpc 1.2.0 + # xpose 0.4.8 * Compatibility fix for ggplot 3.3.0 and tibble 3.0.0 diff --git a/R/read_nm_tables.R b/R/read_nm_tables.R index d17a585f..a74e2052 100755 --- a/R/read_nm_tables.R +++ b/R/read_nm_tables.R @@ -348,12 +348,18 @@ combine_tables <- function(x) { return(dplyr::tibble(data = list(), index = list())) } + # Prepare the combined data + # Note: here the data may contain duplicated columns so + # we de-duplicate them in base R to avoid errors + # with the tidyverse. + tmp_df <- do.call("cbind", unname(x$data)) + tmp_df <- tmp_df[, which(!duplicated(names(tmp_df))) ] %>% + tibble::as_tibble() %>% + tidyr::drop_na(dplyr::one_of('ID')) %>% + list() + # Combine tables - dplyr::tibble(data = x$data %>% - dplyr::bind_cols() %>% - purrr::set_names(make.unique(names(.))) %>% - tidyr::drop_na(dplyr::one_of('ID')) %>% - list(), + dplyr::tibble(data = tmp_df, index = list(dplyr::bind_rows(x$index))) } diff --git a/R/summarise_nm_model.R b/R/summarise_nm_model.R index d1bde21d..3372b303 100755 --- a/R/summarise_nm_model.R +++ b/R/summarise_nm_model.R @@ -239,7 +239,7 @@ sum_nobs <- function(model, software) { x %>% dplyr::mutate(subprob = 0, label = 'nobs', - value = stringr::str_match(.$code, '\\d+')) %>% + value = stringr::str_extract(.$code, '\\d+')) %>% dplyr::select(dplyr::one_of('problem', 'subprob', 'label', 'value')) } } @@ -256,7 +256,7 @@ sum_nind <- function(model, software) { x %>% dplyr::mutate(subprob = 0, label = 'nind', - value = stringr::str_match(.$code, '\\d+')) %>% + value = stringr::str_extract(.$code, '\\d+')) %>% dplyr::select(dplyr::one_of('problem', 'subprob', 'label', 'value')) } } diff --git a/R/vpc_data.R b/R/vpc_data.R index 76bc14a7..3fbf3b39 100755 --- a/R/vpc_data.R +++ b/R/vpc_data.R @@ -118,6 +118,13 @@ vpc_data <- function(xpdb, sim_cols = sim_cols, ci = opt$ci, uloq = opt$uloq, lloq = opt$lloq, smooth = FALSE, vpcdb = TRUE, verbose = !quiet) } else if (vpc_type == 'censored') { + + # TEMPORARY check compatibility of versions + if (utils::packageVersion("dplyr") > "0.8.5" & utils::packageVersion("vpc") < "1.2.1") { + stop(paste0("`dplyr` (v", utils::packageVersion("dplyr"), + ") and `vpc` (v", utils::packageVersion("vpc"), ") are not compatible with each other."), call. = FALSE) + } + vpc_dat <- vpc::vpc_cens(obs = obs_data, sim = sim_data, psn_folder = NULL, bins = opt$bins, n_bins = opt$n_bins, bin_mid = opt$bin_mid, obs_cols = obs_cols, sim_cols = sim_cols, stratify = stratify, ci = opt$ci, @@ -150,6 +157,8 @@ vpc_data <- function(xpdb, 'ylab', 'labeller')) %>% purrr::map_at('vpc_dat', function(x) { x <- x %>% + dplyr::ungroup() %>% + dplyr::mutate_all(.funs = unname) %>% # remove warning in gather tidyr::gather(key = 'tmp', value = 'value', dplyr::matches('\\.(low|med|up)')) %>% tidyr::separate(col = !!rlang::sym('tmp'), into = c('Simulations', 'ci'), sep = '\\.') %>% @@ -179,6 +188,7 @@ vpc_data <- function(xpdb, if (vpc_type == 'continuous') { x <- x %>% dplyr::ungroup() %>% + dplyr::mutate_all(.funs = unname) %>% # remove warning in gather tidyr::gather(key = 'Observations', value = 'value', dplyr::one_of('obs5', 'obs50', 'obs95')) %>% dplyr::mutate(Observations = factor(.$Observations, levels = c('obs5', 'obs50', 'obs95'), labels = c(stringr::str_c(min(opt$pi)*100, 'th percentile'), diff --git a/data-raw/xpdb_ex_pk.R b/data-raw/xpdb_ex_pk.R index b8850c5f..b1a849b3 100755 --- a/data-raw/xpdb_ex_pk.R +++ b/data-raw/xpdb_ex_pk.R @@ -7,18 +7,18 @@ library(xpose) # Generate xpdb -xpdb_ex_pk <- xpose_data(runno = '001', - dir = here::here('inst/extdata/'), +xpdb_ex_pk <- xpose_data(runno = "001", + dir = here::here("inst/extdata/"), quiet = FALSE) # Overwrite directory paths to make it look clean in examples -xpdb_ex_pk$summary$value[xpdb_ex_pk$summary$label == 'dir'] <- 'analysis/models/pk/' -xpdb_ex_pk$options$dir <- 'analysis/models/pk/' -attr(xpdb_ex_pk$code, 'dir') <- 'analysis/models/pk/' +xpdb_ex_pk$summary$value[xpdb_ex_pk$summary$label == "dir"] <- "data" +xpdb_ex_pk$options$dir <- "data" +attr(xpdb_ex_pk$code, "dir") <- "data" # Ensure the xpose data class is preserved xpdb_ex_pk <- xpose::as.xpdb(xpdb_ex_pk) # Export rda to data folder -save(xpdb_ex_pk, file = here::here('data/xpdb_ex_pk.rda'), +save(xpdb_ex_pk, file = here::here("data/xpdb_ex_pk.rda"), compress = 'xz', version = 2) diff --git a/data/xpdb_ex_pk.rda b/data/xpdb_ex_pk.rda index eb5405bc..9ddf46ca 100755 Binary files a/data/xpdb_ex_pk.rda and b/data/xpdb_ex_pk.rda differ diff --git a/docs/404.html b/docs/404.html index ce9bfcdb..4d541c63 100644 --- a/docs/404.html +++ b/docs/404.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -46,7 +50,6 @@ - @@ -64,7 +67,7 @@ - +
@@ -170,6 +173,12 @@

Page not found (404)

+ + @@ -180,7 +189,7 @@

Page not found (404)

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/CODE_OF_CONDUCT.html b/docs/CODE_OF_CONDUCT.html index b8be45c9..e9a48795 100644 --- a/docs/CODE_OF_CONDUCT.html +++ b/docs/CODE_OF_CONDUCT.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -46,7 +50,6 @@ - @@ -64,7 +67,7 @@ - +
@@ -219,6 +222,12 @@

+ + @@ -229,7 +238,7 @@

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/CONTRIBUTING.html b/docs/CONTRIBUTING.html index 3af76d13..8090d77b 100644 --- a/docs/CONTRIBUTING.html +++ b/docs/CONTRIBUTING.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -46,7 +50,6 @@ - @@ -64,7 +67,7 @@ - +
@@ -223,6 +226,12 @@

+ + @@ -233,7 +242,7 @@

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 59590fb2..127b210f 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -46,7 +50,6 @@ - @@ -64,7 +67,7 @@ - +
@@ -335,6 +338,12 @@

License

+ + @@ -345,7 +354,7 @@

License

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/articles/about.html b/docs/articles/about.html index c0853107..f61f88c7 100644 --- a/docs/articles/about.html +++ b/docs/articles/about.html @@ -12,21 +12,21 @@ - - - - + + + + + - + - - +
- @@ -256,7 +242,7 @@

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/articles/access_xpdb_data.html b/docs/articles/access_xpdb_data.html index 661ad60f..f680f34d 100644 --- a/docs/articles/access_xpdb_data.html +++ b/docs/articles/access_xpdb_data.html @@ -12,21 +12,21 @@ - - - - + + + + + - + - - +

Access the model code

The get_code() function can be used to access the parsed model code from the xpdb. This code was used to create the summary and find table names. The parsed code can be used to get additional information about the run. If the argument .problem is specified a subset of the code can be returned based on $PROBLEM.

Note that general code warnings and PsN outputs appended are listed as problem 0.

-
code <- get_code(xpdb)
-code
+
code <- get_code(xpdb)
+code
# A tibble: 764 x 5
    problem level subroutine code                                           comment                  
  *   <int> <int> <chr>      <chr>                                          <chr>                    
@@ -180,8 +180,8 @@ 

Access the output data

The get_data() function can be used to access the imported table files. Tables can be accessed by table name or by .problem. In the latter a single dataset containing all aggregated tables is returned. If more than one table name or .problem number is provided a named list is returned.

Note when providing a table name it is not guaranteed that the table will be identical to its file (i.e. the order of the columns may have been changed and tables with FIRSTONLY will no longer be deduplicated).

-
data <- get_data(xpdb, table = 'cotab001')
-data
+
data <- get_data(xpdb, table = 'cotab001')
+data
# A tibble: 550 x 4
    ID     CLCR   AGE    WT
    <fct> <dbl> <dbl> <dbl>
@@ -201,8 +201,8 @@ 

Access the run files

The get_file() function can be used to access the imported output files. Files can be accessed by file name, by .problem, .subprob and/or .method. If more than one file name, .problem, .subprob, or .method is provided a named list is returned.

-
file <- get_file(xpdb, file = 'run001.ext')
-file
+
file <- get_file(xpdb, file = 'run001.ext')
+file
# A tibble: 28 x 16
    ITERATION THETA1 THETA2 THETA3 THETA4 THETA5  THETA6  THETA7 `SIGMA(1,1)` `OMEGA(1,1)`
        <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>   <dbl>   <dbl>        <dbl>        <dbl>
@@ -223,9 +223,9 @@ 

Access the parameter estimates

The get_prm() function can be used to access the parameter estimates. To get a nice parameter table printed to the console use the function prm_table() instead. The arguments .problem, .subprob and .method can be used to select the parameter estimates to output.

-
# Raw output for editing
-prm <- get_prm(xpdb, digits = 4)
-prm
+
# Raw output for editing
+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>
@@ -240,8 +240,8 @@ 

9 ome OMEGA(2,2) "IIV V" 0.195 0.0320 0.164 FALSE TRUE 2 2 10 ome OMEGA(3,3) "IIV KA" 1.38 0.202 0.146 FALSE TRUE 3 3 11 sig SIGMA(1,1) "" 1 NA NA TRUE TRUE 1 1

-
# Nicely formated table
-prm_table(xpdb, digits = 4)
+
# Nicely formated table
+prm_table(xpdb, digits = 4)

 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.
@@ -265,13 +265,13 @@ 

Access the run summary

The get_summary() function can be used to access the generated run summary from which the template_titles. If the argument .problem is specified a subset of the summary can be returned based on $PROBLEM.

Note that general summary information are listed as problem 0.

-
run_sum <- get_summary(xpdb, .problem = 0)
-run_sum
+
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/          
+ 2       0       0 Run directory       dir         data                         
  3       0       0 Run errors          errors      na                           
  4       0       0 ESAMPLE seed number esampleseed na                           
  5       0       0 Run file            file        run001.lst                   
@@ -285,7 +285,7 @@ 

-
-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/articles/customize_plots.html b/docs/articles/customize_plots.html index ddf32add..74117d72 100644 --- a/docs/articles/customize_plots.html +++ b/docs/articles/customize_plots.html @@ -12,21 +12,21 @@ - - - - + + + + + - + - - +
@@ -229,11 +229,11 @@

  • If facets is a string e.g facets = "SEX", ggforce::facet_wrap_paginate will be used
  • If facets is a formula e.g facets = SEX~MED1, ggforce::facet_grid_paginate will be used
  • -
    # Example with a string
    -dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1, page = 1)
    +
    # Example with a string
    +dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1, page = 1)

    -
    # Example with a formula
    -dv_vs_ipred(xpdb, facets = SEX~MED1, margins = TRUE)
    +
    # Example with a formula
    +dv_vs_ipred(xpdb, facets = SEX~MED1, margins = TRUE)

    All xpose plot functions accept arguments for facet_wrap_pagninate and facet_grid_paginate (e.g. ncol = 2, labeller = 'label_both', etc.). With the default xpose theme scales are set to 'free' from one panel to another (scales = 'free'), this behavior can be changed with scales = 'fixed', 'free_y' or 'free_x'.

    For more information on the available faceting options read the help of facet_wrap_paginate and facet_grid_paginate from the package ggforce.

    @@ -243,32 +243,32 @@

    Additional layers

    xpose offers the opportunity to add any additional layers from ggplot2. Hence, a ggplot2::geom_rug() layer could be added to the dv_vs_ipred() plot along with some annotations (ggplot2::annotate()). Note: the additional layers do not inherit from the xpose aesthetic mapping (i.e. colors or other options need to be defined in each layer as shown below).

    Layers can also be used to modify the aesthetics scales for example ggplot2::scale_color_manual(), or remove a legend ggplot2::scale_fill_identity().

    -
    dv_vs_ipred(xpdb) +
    -  geom_rug(alpha = 0.2, color = 'grey50',
    -           sides = 'lb', size = 0.4) +
    -  annotate(geom = 'text',
    -           fontface = 'bold',
    -           color = 'darkred',
    -           size  = 3,
    -           label = 'Toxic concentrations', x = 1.35, y = 1.75) +
    -  annotate(geom = 'rect',
    -           alpha = 0.2, fill = 'red',
    -           xmin = 1, xmax = Inf,
    -           ymin = 1, ymax = Inf)
    +
    dv_vs_ipred(xpdb) +
    +  geom_rug(alpha = 0.2, color = 'grey50',
    +           sides = 'lb', size = 0.4) +
    +  annotate(geom = 'text',
    +           fontface = 'bold',
    +           color = 'darkred',
    +           size  = 3,
    +           label = 'Toxic concentrations', x = 1.35, y = 1.75) +
    +  annotate(geom = 'rect',
    +           alpha = 0.2, fill = 'red',
    +           xmin = 1, xmax = Inf,
    +           ymin = 1, ymax = Inf)

    Scales options

    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')
    +
    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')
    +
    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')

    @@ -281,16 +281,16 @@

  • An xpose (xp_theme) theme controlling the aspect of the layers such as points or lines
  • Themes can be attached to an xpdb when importing the data with xpose_data() or using the function update_themes() on an xpdb object.

    -
    # While creating the xpdb
    -xpdb <- xpose_data(runno = '001', 
    -                   gg_theme = theme_minimal(), 
    -                   xp_theme = theme_xp_xpose4())
    -
    -# Update a pre-existing xpdb
    -xpdb <- update_themes(xpdb     = xpdb,
    -                      gg_theme = theme_bw2(),
    -                      xp_theme = list(point_color = 'dodgerblue4',
    -                                      line_color  = 'dodgerblue4')) 
    +
    # While creating the xpdb
    +xpdb <- xpose_data(runno = '001',
    +                   gg_theme = theme_minimal(),
    +                   xp_theme = theme_xp_xpose4())
    +
    +# Update a pre-existing xpdb
    +xpdb <- update_themes(xpdb     = xpdb,
    +                      gg_theme = theme_bw2(),
    +                      xp_theme = list(point_color = 'dodgerblue4',
    +                                      line_color  = 'dodgerblue4'))

    Examples of gg_theme:

    @@ -305,7 +305,7 @@

    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/articles/customize_plots_files/figure-html/demo aesthetics-1.png b/docs/articles/customize_plots_files/figure-html/demo aesthetics-1.png index 49e3f8df..a44f050b 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo aesthetics-1.png and b/docs/articles/customize_plots_files/figure-html/demo aesthetics-1.png differ diff --git a/docs/articles/customize_plots_files/figure-html/demo layers-1.png b/docs/articles/customize_plots_files/figure-html/demo layers-1.png index 0feaf5fc..a9824e73 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo layers-1.png and b/docs/articles/customize_plots_files/figure-html/demo layers-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 a4ef703d..3056ddc1 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 8a862466..f05e7821 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 213a3ff8..c4283ed3 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 titles-1.png b/docs/articles/customize_plots_files/figure-html/demo titles-1.png index 40184bb1..cf0e5455 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo titles-1.png and b/docs/articles/customize_plots_files/figure-html/demo titles-1.png differ diff --git a/docs/articles/customize_plots_files/figure-html/demo titles-3.png b/docs/articles/customize_plots_files/figure-html/demo titles-3.png index b494ebef..8f702c03 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo titles-3.png and b/docs/articles/customize_plots_files/figure-html/demo titles-3.png differ diff --git a/docs/articles/customize_plots_files/figure-html/demo type vpc-1.png b/docs/articles/customize_plots_files/figure-html/demo type vpc-1.png index c404c08f..6517465c 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo type vpc-1.png and b/docs/articles/customize_plots_files/figure-html/demo type vpc-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 index 2b4cf6de..6f4365a0 100644 Binary files a/docs/articles/customize_plots_files/figure-html/log-scales demo-1.png 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 index 5bdab6bc..39fa097d 100644 Binary files a/docs/articles/customize_plots_files/figure-html/scales-options demo-1.png 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 bc6ffb8f..1bfff156 100644 --- a/docs/articles/faq.html +++ b/docs/articles/faq.html @@ -12,21 +12,21 @@ - - - - + + + + + - + - - +
    - @@ -213,7 +204,7 @@

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/articles/import_model_outputs.html b/docs/articles/import_model_outputs.html index c237c87e..9fefc188 100644 --- a/docs/articles/import_model_outputs.html +++ b/docs/articles/import_model_outputs.html @@ -12,21 +12,21 @@ - - - - + + + + + - + - - +

    @@ -168,13 +168,13 @@

  • output and simulation tables: for the actual data
  • When importing the files, xpose will return messages to the console and inform of any issue encountered during the import.

    -
    xpdb <- xpose_data(runno = '001')
    -
    -Looking for nonmem output tables
    -Reading: sdtab001, catab001, cotab001, patab001 [$prob no.1]
    -
    -Looking for nonmem output files
    -Reading: run001.cor, run001.cov, run001.ext, run001.grd, run001.phi
    +
    xpdb <- xpose_data(runno = '001')
    +
    +Looking for nonmem output tables
    +Reading: sdtab001, catab001, cotab001, patab001 [$prob no.1]
    +
    +Looking for nonmem output files
    +Reading: run001.cor, run001.cov, run001.ext, run001.grd, run001.phi

    These messages can be silenced with the option quiet = TRUE.

    @@ -219,7 +219,7 @@

    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/articles/index.html b/docs/articles/index.html index 0df977c4..66a11fac 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -46,7 +50,6 @@ - @@ -64,7 +67,7 @@ - +
    @@ -170,18 +173,28 @@

    Articles

    All vignettes

    - +
    +
    About xpose
    +
    +
    Access the xpdb data
    +
    +
    Customize plots
    +
    +
    Frequently Asked Questions
    +
    +
    Import model outputs
    +
    +
    Creating interactive plots
    +
    +
    Introduction
    +
    +
    Plots with multiple pages
    +
    +
    The xpose plots
    +
    +
    Visual Predictive Checks (VPC)
    +
    +
    @@ -193,7 +206,7 @@

    All vignettes

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/articles/interactive_plots.html b/docs/articles/interactive_plots.html index f427bb96..c0a2fc4d 100644 --- a/docs/articles/interactive_plots.html +++ b/docs/articles/interactive_plots.html @@ -12,21 +12,21 @@ - - - - + + + + + - + - - +
    +

    Load packages

    Start by loading the plotly and xpose packages.

    -
    library(plotly)
    -library(xpose)
    +
    library(plotly)
    +library(xpose)

    Generate a plot with xpose

    Then generate any plot in xpose and store it in an object.

    -
    gof_plot <- dv_vs_ipred(xpdb_ex_pk, type = 'pl',
    -                        aes(point_color = SEX, 
    -                            line_color = SEX)) +
    -             labs(color = 'Sex', title = 'DV vs IPRED')
    +
    gof_plot <- dv_vs_ipred(xpdb_ex_pk, type = 'pl',
    +                        aes(point_color = SEX,
    +                            line_color = SEX)) +
    +             labs(color = 'Sex', title = 'DV vs IPRED')
    ## Using data from $prob no.1
    ## Filtering data by EVID == 0
    @@ -172,9 +172,9 @@

    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)
    -
    - +
    plotly::ggplotly(gof_plot)
    +
    +

    @@ -182,26 +182,26 @@

    A distribution

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

    VPC

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

    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/articles/interactive_plots_files/plotly-binding-4.9.2.1/plotly.js b/docs/articles/interactive_plots_files/plotly-binding-4.9.2.1/plotly.js new file mode 100644 index 00000000..a625ab2e --- /dev/null +++ b/docs/articles/interactive_plots_files/plotly-binding-4.9.2.1/plotly.js @@ -0,0 +1,935 @@ + +HTMLWidgets.widget({ + name: "plotly", + type: "output", + + initialize: function(el, width, height) { + return {}; + }, + + resize: function(el, width, height, instance) { + if (instance.autosize) { + var width = instance.width || width; + var height = instance.height || height; + Plotly.relayout(el.id, {width: width, height: height}); + } + }, + + renderValue: function(el, x, instance) { + + // Plotly.relayout() mutates the plot input object, so make sure to + // keep a reference to the user-supplied width/height *before* + // we call Plotly.plot(); + var lay = x.layout || {}; + instance.width = lay.width; + instance.height = lay.height; + instance.autosize = lay.autosize || true; + + /* + / 'inform the world' about highlighting options this is so other + / crosstalk libraries have a chance to respond to special settings + / such as persistent selection. + / AFAIK, leaflet is the only library with such intergration + / https://github.com/rstudio/leaflet/pull/346/files#diff-ad0c2d51ce5fdf8c90c7395b102f4265R154 + */ + var ctConfig = crosstalk.var('plotlyCrosstalkOpts').set(x.highlight); + + if (typeof(window) !== "undefined") { + // make sure plots don't get created outside the network (for on-prem) + window.PLOTLYENV = window.PLOTLYENV || {}; + window.PLOTLYENV.BASE_URL = x.base_url; + + // Enable persistent selection when shift key is down + // https://stackoverflow.com/questions/1828613/check-if-a-key-is-down + var persistOnShift = function(e) { + if (!e) window.event; + if (e.shiftKey) { + x.highlight.persistent = true; + x.highlight.persistentShift = true; + } else { + x.highlight.persistent = false; + x.highlight.persistentShift = false; + } + }; + + // Only relevant if we haven't forced persistent mode at command line + if (!x.highlight.persistent) { + window.onmousemove = persistOnShift; + } + } + + var graphDiv = document.getElementById(el.id); + + // TODO: move the control panel injection strategy inside here... + HTMLWidgets.addPostRenderHandler(function() { + + // lower the z-index of the modebar to prevent it from highjacking hover + // (TODO: do this via CSS?) + // https://github.com/ropensci/plotly/issues/956 + // https://www.w3schools.com/jsref/prop_style_zindex.asp + var modebars = document.querySelectorAll(".js-plotly-plot .plotly .modebar"); + for (var i = 0; i < modebars.length; i++) { + modebars[i].style.zIndex = 1; + } + }); + + // inject a "control panel" holding selectize/dynamic color widget(s) + if (x.selectize || x.highlight.dynamic && !instance.plotly) { + var flex = document.createElement("div"); + flex.class = "plotly-crosstalk-control-panel"; + flex.style = "display: flex; flex-wrap: wrap"; + + // inject the colourpicker HTML container into the flexbox + if (x.highlight.dynamic) { + var pickerDiv = document.createElement("div"); + + var pickerInput = document.createElement("input"); + pickerInput.id = el.id + "-colourpicker"; + pickerInput.placeholder = "asdasd"; + + var pickerLabel = document.createElement("label"); + pickerLabel.for = pickerInput.id; + pickerLabel.innerHTML = "Brush color  "; + + pickerDiv.appendChild(pickerLabel); + pickerDiv.appendChild(pickerInput); + flex.appendChild(pickerDiv); + } + + // inject selectize HTML containers (one for every crosstalk group) + if (x.selectize) { + var ids = Object.keys(x.selectize); + + for (var i = 0; i < ids.length; i++) { + var container = document.createElement("div"); + container.id = ids[i]; + container.style = "width: 80%; height: 10%"; + container.class = "form-group crosstalk-input-plotly-highlight"; + + var label = document.createElement("label"); + label.for = ids[i]; + label.innerHTML = x.selectize[ids[i]].group; + label.class = "control-label"; + + var selectDiv = document.createElement("div"); + var select = document.createElement("select"); + select.multiple = true; + + selectDiv.appendChild(select); + container.appendChild(label); + container.appendChild(selectDiv); + flex.appendChild(container); + } + } + + // finally, insert the flexbox inside the htmlwidget container, + // but before the plotly graph div + graphDiv.parentElement.insertBefore(flex, graphDiv); + + if (x.highlight.dynamic) { + var picker = $("#" + pickerInput.id); + var colors = x.highlight.color || []; + // TODO: let users specify options? + var opts = { + value: colors[0], + showColour: "both", + palette: "limited", + allowedCols: colors.join(" "), + width: "20%", + height: "10%" + }; + picker.colourpicker({changeDelay: 0}); + picker.colourpicker("settings", opts); + picker.colourpicker("value", opts.value); + // inform crosstalk about a change in the current selection colour + var grps = x.highlight.ctGroups || []; + for (var i = 0; i < grps.length; i++) { + crosstalk.group(grps[i]).var('plotlySelectionColour') + .set(picker.colourpicker('value')); + } + picker.on("change", function() { + for (var i = 0; i < grps.length; i++) { + crosstalk.group(grps[i]).var('plotlySelectionColour') + .set(picker.colourpicker('value')); + } + }); + } + } + + // if no plot exists yet, create one with a particular configuration + if (!instance.plotly) { + + var plot = Plotly.plot(graphDiv, x); + instance.plotly = true; + + } else { + + // this is essentially equivalent to Plotly.newPlot(), but avoids creating + // a new webgl context + // https://github.com/plotly/plotly.js/blob/2b24f9def901831e61282076cf3f835598d56f0e/src/plot_api/plot_api.js#L531-L532 + + // TODO: restore crosstalk selections? + Plotly.purge(graphDiv); + // TODO: why is this necessary to get crosstalk working? + graphDiv.data = undefined; + graphDiv.layout = undefined; + var plot = Plotly.plot(graphDiv, x); + } + + // Trigger plotly.js calls defined via `plotlyProxy()` + plot.then(function() { + if (HTMLWidgets.shinyMode) { + Shiny.addCustomMessageHandler("plotly-calls", function(msg) { + var gd = document.getElementById(msg.id); + if (!gd) { + throw new Error("Couldn't find plotly graph with id: " + msg.id); + } + // This isn't an official plotly.js method, but it's the only current way to + // change just the configuration of a plot + // https://community.plot.ly/t/update-config-function/9057 + if (msg.method == "reconfig") { + Plotly.react(gd, gd.data, gd.layout, msg.args); + return; + } + if (!Plotly[msg.method]) { + throw new Error("Unknown method " + msg.method); + } + var args = [gd].concat(msg.args); + Plotly[msg.method].apply(null, args); + }); + } + + // plotly's mapbox API doesn't currently support setting bounding boxes + // https://www.mapbox.com/mapbox-gl-js/example/fitbounds/ + // so we do this manually... + // TODO: make sure this triggers on a redraw and relayout as well as on initial draw + var mapboxIDs = graphDiv._fullLayout._subplots.mapbox || []; + for (var i = 0; i < mapboxIDs.length; i++) { + var id = mapboxIDs[i]; + var mapOpts = x.layout[id] || {}; + var args = mapOpts._fitBounds || {}; + if (!args) { + continue; + } + var mapObj = graphDiv._fullLayout[id]._subplot.map; + mapObj.fitBounds(args.bounds, args.options); + } + + }); + + // Attach attributes (e.g., "key", "z") to plotly event data + function eventDataWithKey(eventData) { + if (eventData === undefined || !eventData.hasOwnProperty("points")) { + return null; + } + return eventData.points.map(function(pt) { + var obj = { + curveNumber: pt.curveNumber, + pointNumber: pt.pointNumber, + x: pt.x, + y: pt.y + }; + + // If 'z' is reported with the event data, then use it! + if (pt.hasOwnProperty("z")) { + obj.z = pt.z; + } + + if (pt.hasOwnProperty("customdata")) { + obj.customdata = pt.customdata; + } + + /* + TL;DR: (I think) we have to select the graph div (again) to attach keys... + + Why? Remember that crosstalk will dynamically add/delete traces + (see traceManager.prototype.updateSelection() below) + For this reason, we can't simply grab keys from x.data (like we did previously) + Moreover, we can't use _fullData, since that doesn't include + unofficial attributes. It's true that click/hover events fire with + pt.data, but drag events don't... + */ + var gd = document.getElementById(el.id); + var trace = gd.data[pt.curveNumber]; + + if (!trace._isSimpleKey) { + var attrsToAttach = ["key"]; + } else { + // simple keys fire the whole key + obj.key = trace.key; + var attrsToAttach = []; + } + + for (var i = 0; i < attrsToAttach.length; i++) { + var attr = trace[attrsToAttach[i]]; + if (Array.isArray(attr)) { + if (typeof pt.pointNumber === "number") { + obj[attrsToAttach[i]] = attr[pt.pointNumber]; + } else if (Array.isArray(pt.pointNumber)) { + obj[attrsToAttach[i]] = attr[pt.pointNumber[0]][pt.pointNumber[1]]; + } else if (Array.isArray(pt.pointNumbers)) { + obj[attrsToAttach[i]] = pt.pointNumbers.map(function(idx) { return attr[idx]; }); + } + } + } + return obj; + }); + } + + + var legendEventData = function(d) { + // if legendgroup is not relevant just return the trace + var trace = d.data[d.curveNumber]; + if (!trace.legendgroup) return trace; + + // if legendgroup was specified, return all traces that match the group + var legendgrps = d.data.map(function(trace){ return trace.legendgroup; }); + var traces = []; + for (i = 0; i < legendgrps.length; i++) { + if (legendgrps[i] == trace.legendgroup) { + traces.push(d.data[i]); + } + } + + return traces; + }; + + + // send user input event data to shiny + if (HTMLWidgets.shinyMode && Shiny.setInputValue) { + + // Some events clear other input values + // TODO: always register these? + var eventClearMap = { + plotly_deselect: ["plotly_selected", "plotly_selecting", "plotly_brushed", "plotly_brushing", "plotly_click"], + plotly_unhover: ["plotly_hover"], + plotly_doubleclick: ["plotly_click"] + }; + + Object.keys(eventClearMap).map(function(evt) { + graphDiv.on(evt, function() { + var inputsToClear = eventClearMap[evt]; + inputsToClear.map(function(input) { + Shiny.setInputValue(input + "-" + x.source, null, {priority: "event"}); + }); + }); + }); + + var eventDataFunctionMap = { + plotly_click: eventDataWithKey, + plotly_sunburstclick: eventDataWithKey, + plotly_hover: eventDataWithKey, + plotly_unhover: eventDataWithKey, + // If 'plotly_selected' has already been fired, and you click + // on the plot afterwards, this event fires `undefined`?!? + // That might be considered a plotly.js bug, but it doesn't make + // sense for this input change to occur if `d` is falsy because, + // even in the empty selection case, `d` is truthy (an object), + // and the 'plotly_deselect' event will reset this input + plotly_selected: function(d) { if (d) { return eventDataWithKey(d); } }, + plotly_selecting: function(d) { if (d) { return eventDataWithKey(d); } }, + plotly_brushed: function(d) { + if (d) { return d.range ? d.range : d.lassoPoints; } + }, + plotly_brushing: function(d) { + if (d) { return d.range ? d.range : d.lassoPoints; } + }, + plotly_legendclick: legendEventData, + plotly_legenddoubleclick: legendEventData, + plotly_clickannotation: function(d) { return d.fullAnnotation } + }; + + var registerShinyValue = function(event) { + var eventDataPreProcessor = eventDataFunctionMap[event] || function(d) { return d ? d : el.id }; + // some events are unique to the R package + var plotlyJSevent = (event == "plotly_brushed") ? "plotly_selected" : (event == "plotly_brushing") ? "plotly_selecting" : event; + // register the event + graphDiv.on(plotlyJSevent, function(d) { + Shiny.setInputValue( + event + "-" + x.source, + JSON.stringify(eventDataPreProcessor(d)), + {priority: "event"} + ); + }); + } + + var shinyEvents = x.shinyEvents || []; + shinyEvents.map(registerShinyValue); + } + + // Given an array of {curveNumber: x, pointNumber: y} objects, + // return a hash of { + // set1: {value: [key1, key2, ...], _isSimpleKey: false}, + // set2: {value: [key3, key4, ...], _isSimpleKey: false} + // } + function pointsToKeys(points) { + var keysBySet = {}; + for (var i = 0; i < points.length; i++) { + + var trace = graphDiv.data[points[i].curveNumber]; + if (!trace.key || !trace.set) { + continue; + } + + // set defaults for this keySet + // note that we don't track the nested property (yet) since we always + // emit the union -- http://cpsievert.github.io/talks/20161212b/#21 + keysBySet[trace.set] = keysBySet[trace.set] || { + value: [], + _isSimpleKey: trace._isSimpleKey + }; + + // Use pointNumber by default, but aggregated traces should emit pointNumbers + var ptNum = points[i].pointNumber; + var hasPtNum = typeof ptNum === "number"; + var ptNum = hasPtNum ? ptNum : points[i].pointNumbers; + + // selecting a point of a "simple" trace means: select the + // entire key attached to this trace, which is useful for, + // say clicking on a fitted line to select corresponding observations + var key = trace._isSimpleKey ? trace.key : Array.isArray(ptNum) ? ptNum.map(function(idx) { return trace.key[idx]; }) : trace.key[ptNum]; + // http://stackoverflow.com/questions/10865025/merge-flatten-an-array-of-arrays-in-javascript + var keyFlat = trace._isNestedKey ? [].concat.apply([], key) : key; + + // TODO: better to only add new values? + keysBySet[trace.set].value = keysBySet[trace.set].value.concat(keyFlat); + } + + return keysBySet; + } + + + x.highlight.color = x.highlight.color || []; + // make sure highlight color is an array + if (!Array.isArray(x.highlight.color)) { + x.highlight.color = [x.highlight.color]; + } + + var traceManager = new TraceManager(graphDiv, x.highlight); + + // Gather all *unique* sets. + var allSets = []; + for (var curveIdx = 0; curveIdx < x.data.length; curveIdx++) { + var newSet = x.data[curveIdx].set; + if (newSet) { + if (allSets.indexOf(newSet) === -1) { + allSets.push(newSet); + } + } + } + + // register event listeners for all sets + for (var i = 0; i < allSets.length; i++) { + + var set = allSets[i]; + var selection = new crosstalk.SelectionHandle(set); + var filter = new crosstalk.FilterHandle(set); + + var filterChange = function(e) { + removeBrush(el); + traceManager.updateFilter(set, e.value); + }; + filter.on("change", filterChange); + + + var selectionChange = function(e) { + + // Workaround for 'plotly_selected' now firing previously selected + // points (in addition to new ones) when holding shift key. In our case, + // we just want the new keys + if (x.highlight.on === "plotly_selected" && x.highlight.persistentShift) { + // https://stackoverflow.com/questions/1187518/how-to-get-the-difference-between-two-arrays-in-javascript + Array.prototype.diff = function(a) { + return this.filter(function(i) {return a.indexOf(i) < 0;}); + }; + e.value = e.value.diff(e.oldValue); + } + + // array of "event objects" tracking the selection history + // this is used to avoid adding redundant selections + var selectionHistory = crosstalk.var("plotlySelectionHistory").get() || []; + + // Construct an event object "defining" the current event. + var event = { + receiverID: traceManager.gd.id, + plotlySelectionColour: crosstalk.group(set).var("plotlySelectionColour").get() + }; + event[set] = e.value; + // TODO: is there a smarter way to check object equality? + if (selectionHistory.length > 0) { + var ev = JSON.stringify(event); + for (var i = 0; i < selectionHistory.length; i++) { + var sel = JSON.stringify(selectionHistory[i]); + if (sel == ev) { + return; + } + } + } + + // accumulate history for persistent selection + if (!x.highlight.persistent) { + selectionHistory = [event]; + } else { + selectionHistory.push(event); + } + crosstalk.var("plotlySelectionHistory").set(selectionHistory); + + // do the actual updating of traces, frames, and the selectize widget + traceManager.updateSelection(set, e.value); + // https://github.com/selectize/selectize.js/blob/master/docs/api.md#methods_items + if (x.selectize) { + if (!x.highlight.persistent || e.value === null) { + selectize.clear(true); + } + selectize.addItems(e.value, true); + selectize.close(); + } + } + selection.on("change", selectionChange); + + // Set a crosstalk variable selection value, triggering an update + var turnOn = function(e) { + if (e) { + var selectedKeys = pointsToKeys(e.points); + // Keys are group names, values are array of selected keys from group. + for (var set in selectedKeys) { + if (selectedKeys.hasOwnProperty(set)) { + selection.set(selectedKeys[set].value, {sender: el}); + } + } + } + }; + if (x.highlight.debounce > 0) { + turnOn = debounce(turnOn, x.highlight.debounce); + } + graphDiv.on(x.highlight.on, turnOn); + + graphDiv.on(x.highlight.off, function turnOff(e) { + // remove any visual clues + removeBrush(el); + // remove any selection history + crosstalk.var("plotlySelectionHistory").set(null); + // trigger the actual removal of selection traces + selection.set(null, {sender: el}); + }); + + // register a callback for selectize so that there is bi-directional + // communication between the widget and direct manipulation events + if (x.selectize) { + var selectizeID = Object.keys(x.selectize)[i]; + var items = x.selectize[selectizeID].items; + var first = [{value: "", label: "(All)"}]; + var opts = { + options: first.concat(items), + searchField: "label", + valueField: "value", + labelField: "label", + maxItems: 50 + }; + var select = $("#" + selectizeID).find("select")[0]; + var selectize = $(select).selectize(opts)[0].selectize; + // NOTE: this callback is triggered when *directly* altering + // dropdown items + selectize.on("change", function() { + var currentItems = traceManager.groupSelections[set] || []; + if (!x.highlight.persistent) { + removeBrush(el); + for (var i = 0; i < currentItems.length; i++) { + selectize.removeItem(currentItems[i], true); + } + } + var newItems = selectize.items.filter(function(idx) { + return currentItems.indexOf(idx) < 0; + }); + if (newItems.length > 0) { + traceManager.updateSelection(set, newItems); + } else { + // Item has been removed... + // TODO: this logic won't work for dynamically changing palette + traceManager.updateSelection(set, null); + traceManager.updateSelection(set, selectize.items); + } + }); + } + } // end of selectionChange + + } // end of renderValue +}); // end of widget definition + +/** + * @param graphDiv The Plotly graph div + * @param highlight An object with options for updating selection(s) + */ +function TraceManager(graphDiv, highlight) { + // The Plotly graph div + this.gd = graphDiv; + + // Preserve the original data. + // TODO: try using Lib.extendFlat() as done in + // https://github.com/plotly/plotly.js/pull/1136 + this.origData = JSON.parse(JSON.stringify(graphDiv.data)); + + // avoid doing this over and over + this.origOpacity = []; + for (var i = 0; i < this.origData.length; i++) { + this.origOpacity[i] = this.origData[i].opacity === 0 ? 0 : (this.origData[i].opacity || 1); + } + + // key: group name, value: null or array of keys representing the + // most recently received selection for that group. + this.groupSelections = {}; + + // selection parameters (e.g., transient versus persistent selection) + this.highlight = highlight; +} + +TraceManager.prototype.close = function() { + // TODO: Unhook all event handlers +}; + +TraceManager.prototype.updateFilter = function(group, keys) { + + if (typeof(keys) === "undefined" || keys === null) { + + this.gd.data = JSON.parse(JSON.stringify(this.origData)); + + } else { + + var traces = []; + for (var i = 0; i < this.origData.length; i++) { + var trace = this.origData[i]; + if (!trace.key || trace.set !== group) { + continue; + } + var matchFunc = getMatchFunc(trace); + var matches = matchFunc(trace.key, keys); + + if (matches.length > 0) { + if (!trace._isSimpleKey) { + // subsetArrayAttrs doesn't mutate trace (it makes a modified clone) + trace = subsetArrayAttrs(trace, matches); + } + traces.push(trace); + } + } + } + + this.gd.data = traces; + Plotly.redraw(this.gd); + + // NOTE: we purposely do _not_ restore selection(s), since on filter, + // axis likely will update, changing the pixel -> data mapping, leading + // to a likely mismatch in the brush outline and highlighted marks + +}; + +TraceManager.prototype.updateSelection = function(group, keys) { + + if (keys !== null && !Array.isArray(keys)) { + throw new Error("Invalid keys argument; null or array expected"); + } + + // if selection has been cleared, or if this is transient + // selection, delete the "selection traces" + var nNewTraces = this.gd.data.length - this.origData.length; + if (keys === null || !this.highlight.persistent && nNewTraces > 0) { + var tracesToRemove = []; + for (var i = 0; i < this.gd.data.length; i++) { + if (this.gd.data[i]._isCrosstalkTrace) tracesToRemove.push(i); + } + Plotly.deleteTraces(this.gd, tracesToRemove); + this.groupSelections[group] = keys; + } else { + // add to the groupSelection, rather than overwriting it + // TODO: can this be removed? + this.groupSelections[group] = this.groupSelections[group] || []; + for (var i = 0; i < keys.length; i++) { + var k = keys[i]; + if (this.groupSelections[group].indexOf(k) < 0) { + this.groupSelections[group].push(k); + } + } + } + + if (keys === null) { + + Plotly.restyle(this.gd, {"opacity": this.origOpacity}); + + } else if (keys.length >= 1) { + + // placeholder for new "selection traces" + var traces = []; + // this variable is set in R/highlight.R + var selectionColour = crosstalk.group(group).var("plotlySelectionColour").get() || + this.highlight.color[0]; + + for (var i = 0; i < this.origData.length; i++) { + // TODO: try using Lib.extendFlat() as done in + // https://github.com/plotly/plotly.js/pull/1136 + var trace = JSON.parse(JSON.stringify(this.gd.data[i])); + if (!trace.key || trace.set !== group) { + continue; + } + // Get sorted array of matching indices in trace.key + var matchFunc = getMatchFunc(trace); + var matches = matchFunc(trace.key, keys); + + if (matches.length > 0) { + // If this is a "simple" key, that means select the entire trace + if (!trace._isSimpleKey) { + trace = subsetArrayAttrs(trace, matches); + } + // reach into the full trace object so we can properly reflect the + // selection attributes in every view + var d = this.gd._fullData[i]; + + /* + / Recursively inherit selection attributes from various sources, + / in order of preference: + / (1) official plotly.js selected attribute + / (2) highlight(selected = attrs_selected(...)) + */ + // TODO: it would be neat to have a dropdown to dynamically specify these! + $.extend(true, trace, this.highlight.selected); + + // if it is defined, override color with the "dynamic brush color"" + if (d.marker) { + trace.marker = trace.marker || {}; + trace.marker.color = selectionColour || trace.marker.color || d.marker.color; + } + if (d.line) { + trace.line = trace.line || {}; + trace.line.color = selectionColour || trace.line.color || d.line.color; + } + if (d.textfont) { + trace.textfont = trace.textfont || {}; + trace.textfont.color = selectionColour || trace.textfont.color || d.textfont.color; + } + if (d.fillcolor) { + // TODO: should selectionColour inherit alpha from the existing fillcolor? + trace.fillcolor = selectionColour || trace.fillcolor || d.fillcolor; + } + // attach a sensible name/legendgroup + trace.name = trace.name || keys.join("
    "); + trace.legendgroup = trace.legendgroup || keys.join("
    "); + + // keep track of mapping between this new trace and the trace it targets + // (necessary for updating frames to reflect the selection traces) + trace._originalIndex = i; + trace._newIndex = this.gd._fullData.length + traces.length; + trace._isCrosstalkTrace = true; + traces.push(trace); + } + } + + if (traces.length > 0) { + + Plotly.addTraces(this.gd, traces).then(function(gd) { + // incrementally add selection traces to frames + // (this is heavily inspired by Plotly.Plots.modifyFrames() + // in src/plots/plots.js) + var _hash = gd._transitionData._frameHash; + var _frames = gd._transitionData._frames || []; + + for (var i = 0; i < _frames.length; i++) { + + // add to _frames[i].traces *if* this frame references selected trace(s) + var newIndices = []; + for (var j = 0; j < traces.length; j++) { + var tr = traces[j]; + if (_frames[i].traces.indexOf(tr._originalIndex) > -1) { + newIndices.push(tr._newIndex); + _frames[i].traces.push(tr._newIndex); + } + } + + // nothing to do... + if (newIndices.length === 0) { + continue; + } + + var ctr = 0; + var nFrameTraces = _frames[i].data.length; + + for (var j = 0; j < nFrameTraces; j++) { + var frameTrace = _frames[i].data[j]; + if (!frameTrace.key || frameTrace.set !== group) { + continue; + } + + var matchFunc = getMatchFunc(frameTrace); + var matches = matchFunc(frameTrace.key, keys); + + if (matches.length > 0) { + if (!trace._isSimpleKey) { + frameTrace = subsetArrayAttrs(frameTrace, matches); + } + var d = gd._fullData[newIndices[ctr]]; + if (d.marker) { + frameTrace.marker = d.marker; + } + if (d.line) { + frameTrace.line = d.line; + } + if (d.textfont) { + frameTrace.textfont = d.textfont; + } + ctr = ctr + 1; + _frames[i].data.push(frameTrace); + } + } + + // update gd._transitionData._frameHash + _hash[_frames[i].name] = _frames[i]; + } + + }); + + // dim traces that have a set matching the set of selection sets + var tracesToDim = [], + opacities = [], + sets = Object.keys(this.groupSelections), + n = this.origData.length; + + for (var i = 0; i < n; i++) { + var opacity = this.origOpacity[i] || 1; + // have we already dimmed this trace? Or is this even worth doing? + if (opacity !== this.gd._fullData[i].opacity || this.highlight.opacityDim === 1) { + continue; + } + // is this set an element of the set of selection sets? + var matches = findMatches(sets, [this.gd.data[i].set]); + if (matches.length) { + tracesToDim.push(i); + opacities.push(opacity * this.highlight.opacityDim); + } + } + + if (tracesToDim.length > 0) { + Plotly.restyle(this.gd, {"opacity": opacities}, tracesToDim); + // turn off the selected/unselected API + Plotly.restyle(this.gd, {"selectedpoints": null}); + } + + } + + } +}; + +/* +Note: in all of these match functions, we assume needleSet (i.e. the selected keys) +is a 1D (or flat) array. The real difference is the meaning of haystack. +findMatches() does the usual thing you'd expect for +linked brushing on a scatterplot matrix. findSimpleMatches() returns a match iff +haystack is a subset of the needleSet. findNestedMatches() returns +*/ + +function getMatchFunc(trace) { + return (trace._isNestedKey) ? findNestedMatches : + (trace._isSimpleKey) ? findSimpleMatches : findMatches; +} + +// find matches for "flat" keys +function findMatches(haystack, needleSet) { + var matches = []; + haystack.forEach(function(obj, i) { + if (obj === null || needleSet.indexOf(obj) >= 0) { + matches.push(i); + } + }); + return matches; +} + +// find matches for "simple" keys +function findSimpleMatches(haystack, needleSet) { + var match = haystack.every(function(val) { + return val === null || needleSet.indexOf(val) >= 0; + }); + // yes, this doesn't make much sense other than conforming + // to the output type of the other match functions + return (match) ? [0] : [] +} + +// find matches for a "nested" haystack (2D arrays) +function findNestedMatches(haystack, needleSet) { + var matches = []; + for (var i = 0; i < haystack.length; i++) { + var hay = haystack[i]; + var match = hay.every(function(val) { + return val === null || needleSet.indexOf(val) >= 0; + }); + if (match) { + matches.push(i); + } + } + return matches; +} + +function isPlainObject(obj) { + return ( + Object.prototype.toString.call(obj) === '[object Object]' && + Object.getPrototypeOf(obj) === Object.prototype + ); +} + +function subsetArrayAttrs(obj, indices) { + var newObj = {}; + Object.keys(obj).forEach(function(k) { + var val = obj[k]; + + if (k.charAt(0) === "_") { + newObj[k] = val; + } else if (k === "transforms" && Array.isArray(val)) { + newObj[k] = val.map(function(transform) { + return subsetArrayAttrs(transform, indices); + }); + } else if (k === "colorscale" && Array.isArray(val)) { + newObj[k] = val; + } else if (isPlainObject(val)) { + newObj[k] = subsetArrayAttrs(val, indices); + } else if (Array.isArray(val)) { + newObj[k] = subsetArray(val, indices); + } else { + newObj[k] = val; + } + }); + return newObj; +} + +function subsetArray(arr, indices) { + var result = []; + for (var i = 0; i < indices.length; i++) { + result.push(arr[indices[i]]); + } + return result; +} + +// Convenience function for removing plotly's brush +function removeBrush(el) { + var outlines = el.querySelectorAll(".select-outline"); + for (var i = 0; i < outlines.length; i++) { + outlines[i].remove(); + } +} + + +// https://davidwalsh.name/javascript-debounce-function + +// Returns a function, that, as long as it continues to be invoked, will not +// be triggered. The function will be called after it stops being called for +// N milliseconds. If `immediate` is passed, trigger the function on the +// leading edge, instead of the trailing. +function debounce(func, wait, immediate) { + var timeout; + return function() { + var context = this, args = arguments; + var later = function() { + timeout = null; + if (!immediate) func.apply(context, args); + }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) func.apply(context, args); + }; +}; diff --git a/docs/articles/introduction.html b/docs/articles/introduction.html index 00ea8d31..f9f1094d 100644 --- a/docs/articles/introduction.html +++ b/docs/articles/introduction.html @@ -12,21 +12,21 @@ - - - - + + + + + - + - - +

    Import model output

    The function xpose_data() collects all model output files and table and organizes them into an R object commonly called xpdb which stands for “xpose database”.

    -
    xpdb <- xpose_data(runno = '001', dir = 'analysis/model/pk/')
    +
    xpdb <- xpose_data(runno = '001', dir = 'analysis/model/pk/')

    Glimpse at the xpdb

    The files attached to an xpdb object can be displayed to the console simply by writing its name to the console or by using the print() function.

    -
    xpdb # or print(xpdb)
    +
    xpdb # or print(xpdb)
    run001.lst overview: 
      - Software: nonmem 7.3.0 
    - - Attached files (memory usage 1.3 Mb): 
    + - Attached files (memory usage 1.4 Mb): 
        + obs tabs: $prob no.1: catab001.csv, cotab001, patab001, sdtab001 
        + sim tabs: $prob no.2: simtab001.zip 
        + output files: run001.cor, run001.cov, run001.ext, run001.grd, run001.phi, run001.shk 
        + special: <none> 
      - gg_theme: theme_readable 
      - xp_theme: theme_xp_default 
    - - Options: dir = analysis/models/pk/, quiet = FALSE, manual_import = NULL
    + - Options: dir = data, quiet = FALSE, manual_import = NULL

    Model summary

    A summary of a model run can be displayed to the console by using the summary() function on an xpdb object.

    -
    summary(xpdb)
    +
    summary(xpdb)
    
     Summary for problem no. 0 [Global information] 
      - Software                      @software   : nonmem
      - Software version              @version    : 7.3.0
    - - Run directory                 @dir        : analysis/models/pk/
    + - Run directory                 @dir        : data
      - Run file                      @file       : run001.lst
      - Run number                    @run        : run001
      - Reference model               @ref        : 000
    @@ -211,7 +211,7 @@ 

    Parameter estimates

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

    -
    prm_table(xpdb)
    +
    prm_table(xpdb)
    
     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.
    @@ -234,7 +234,7 @@ 

    Listing variables

    A list of available variables for plotting can be displayed to the console by using the list_vars() function on an xpdb object.

    -
    list_vars(xpdb)
    +
    list_vars(xpdb)
    
     List of available variables for problem no. 1 
      - Subject identifier (id)               : ID
    @@ -265,52 +265,52 @@ 

    Pipes

    xpose makes use of the pipe operator %>% from the package dplyr. Pipes can be used to generate clear workflow.

    -
    xpose_data(runno = '001') %>% 
    -  dv_vs_ipred() %>% 
    -  xpose_save(file = 'run001_dv_vs_ipred.pdf')
    +
    xpose_data(runno = '001') %>%
    +  dv_vs_ipred() %>%
    +  xpose_save(file = 'run001_dv_vs_ipred.pdf')

    Editing the xpdb

    Multiples edits can be made to the xpdb object. For instance the type (visible using the list_vars() function described above) of a variable can be changed. Hence the independent variable (idv) could be changed from TIME (default in NONMEM) to TAD. All plots using idv will then automatically use TAD.

    -
    # With the TIME default
    -xpdb %>% 
    -  dv_vs_idv()
    +
    # With the TIME default
    +xpdb %>%
    +  dv_vs_idv()

    -
    # After IDV reassignment
    -xpdb %>% 
    -  set_var_types(idv = 'TAD') %>% 
    -  dv_vs_idv()
    +
    # After IDV reassignment
    +xpdb %>%
    +  set_var_types(idv = 'TAD') %>%
    +  dv_vs_idv()

    Generating plots

    Plotting functions are used as follows:

    -
    # DV vs. IPRED plot
    -dv_vs_ipred(xpdb)
    +
    # DV vs. IPRED plot
    +dv_vs_ipred(xpdb)

    -
    # CWRES vs. PRED plot
    -res_vs_pred(xpdb, res = 'CWRES')
    +
    # CWRES vs. PRED plot
    +res_vs_pred(xpdb, res = 'CWRES')

    Saving plots

    The xpose_save function was designed to facilitate the export of xpose plots. The file extension is guessed from the file name and must match one of .pdf (default), .jpeg, .png, .bmp or .tiff. If no extension is provided as part of the file name a .pdf will be generated. Finally, if the plot argument is left empty xpose_save will automatically save the last plot that was created or modified.

    -

    The xpose_save() function is compatible with templates titles and keywords such as @run for the run number and @plotfun for the name of the plotting function can be used to automatically name files. Learn more about the template titles keywords using help('template_titles').

    -
    # Save the last generated plot
    -dv_vs_ipred(xpdb)
    -xpose_save(file = 'run001_dv_vs_ipred.pdf')
    -
    -# Template titles can also be used in filename and the directory
    -xpdb %>% 
    - dv_vs_ipred() %>% 
    - xpose_save(file = '@run_@plotfun_[@ofv].jpeg', dir = '@dir')
    +

    The xpose_save() function is compatible with templates titles and keywords such as @run for the run number and @plotfun for the name of the plotting function can be used to automatically name files. Learn more about the template titles keywords using help('template_titles').

    +
    # Save the last generated plot
    +dv_vs_ipred(xpdb)
    +xpose_save(file = 'run001_dv_vs_ipred.pdf')
    +
    +# Template titles can also be used in filename and the directory
    +xpdb %>%
    + dv_vs_ipred() %>%
    + xpose_save(file = '@run_@plotfun_[@ofv].jpeg', dir = '@dir')
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/articles/introduction_files/figure-html/change idv-1.png b/docs/articles/introduction_files/figure-html/change idv-1.png index c2657483..9a1a596a 100644 Binary files a/docs/articles/introduction_files/figure-html/change idv-1.png and b/docs/articles/introduction_files/figure-html/change idv-1.png differ diff --git a/docs/articles/introduction_files/figure-html/change idv-2.png b/docs/articles/introduction_files/figure-html/change idv-2.png index c2474c43..6623ebea 100644 Binary files a/docs/articles/introduction_files/figure-html/change idv-2.png and b/docs/articles/introduction_files/figure-html/change idv-2.png differ diff --git a/docs/articles/introduction_files/figure-html/demo basic gof-1.png b/docs/articles/introduction_files/figure-html/demo basic gof-1.png index ff68e1b3..813b2fe1 100644 Binary files a/docs/articles/introduction_files/figure-html/demo basic gof-1.png and b/docs/articles/introduction_files/figure-html/demo basic gof-1.png differ diff --git a/docs/articles/introduction_files/figure-html/demo basic gof-2.png b/docs/articles/introduction_files/figure-html/demo basic gof-2.png index ad131bc3..a555af0c 100644 Binary files a/docs/articles/introduction_files/figure-html/demo basic gof-2.png and b/docs/articles/introduction_files/figure-html/demo basic gof-2.png differ diff --git a/docs/articles/multiple_pages.html b/docs/articles/multiple_pages.html index 68187cb8..7598fb15 100644 --- a/docs/articles/multiple_pages.html +++ b/docs/articles/multiple_pages.html @@ -12,21 +12,21 @@ - - - - + + + + + - + - - +
    @@ -161,32 +161,32 @@

    Setting the layout

    When the arguments ncol and nrow are set and under the condition that they are more panels to be drawn that can fit on a single page given the selected layout, the multiple page functionality will automatically be enabled.

    -
    dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1)
    +
    dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1)

    Selecting pages

    By default all pages will be shown but this can be time consuming. To select only specific pages to be drawn, use the argument page.

    -
    dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1, page = 1)
    +
    dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1, page = 1)

    It is also possible to change the page(s) to be drawn from an already existing xpose_plot object via the print() function.

    -
    # Create an xpose_plot, by default page = 1
    -p1 <- dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1)
    -
    -# Change the page to be drawn
    -print(p1, page = 2)
    +
    # Create an xpose_plot, by default page = 1
    +p1 <- dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1)
    +
    +# Change the page to be drawn
    +print(p1, page = 2)

    Numbering pages

    To number pages the keywords @page and @lastpage can be used to respectively indicate the current page and the total number of pages.

    -
    dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1, page = 1, caption = 'Page @page of @lastpage')
    +
    dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1, page = 1, caption = 'Page @page of @lastpage')

    To systematically number all generated plots a caption suffix can be defined in the xp_theme.

    -
    xpdb_numbered <- update_themes(xpdb, xp_theme = list(caption_suffix = ', page @page of @lastpage'))
    -
    -dv_vs_ipred(xpdb_numbered, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1, page = 2)
    +
    xpdb_numbered <- update_themes(xpdb, xp_theme = list(caption_suffix = ', page @page of @lastpage'))
    +
    +dv_vs_ipred(xpdb_numbered, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1, page = 2)

    @@ -194,33 +194,19 @@

    Saving multiple pages plots

    Multiple pages graphs can simply be saved by using the xpose_save() function.

    -
    dv_vs_ipred(xpdb_numbered, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1) %>% 
    -xpose_save(file = 'dv_vs_ipred_multiple.pdf')
    +
    dv_vs_ipred(xpdb_numbered, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1) %>%
    +xpose_save(file = 'dv_vs_ipred_multiple.pdf')

    The pdf format can conveniently store multiple pages within a single document. However other graphical devices (e.g. 'png', 'jpg') can also be used, simply ensure to have a page counter (i.e. '%03d') added the file name.

    -
    dv_vs_ipred(xpdb_numbered, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1) %>% 
    -xpose_save(file = '@run_@plotfun_%03d.png')
    +
    dv_vs_ipred(xpdb_numbered, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1) %>%
    +xpose_save(file = '@run_@plotfun_%03d.png')
    - @@ -231,7 +217,7 @@

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    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 f6c81c20..a13e59e8 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 213a3ff8..c4283ed3 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 45bada4d..c7553d29 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 d58b80cd..a1ca0648 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 45bada4d..c7553d29 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-6-1.png b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-6-1.png index ff362eff..b378f10b 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/plot_list.html b/docs/articles/plot_list.html index 0c8b065b..e91f89fd 100644 --- a/docs/articles/plot_list.html +++ b/docs/articles/plot_list.html @@ -12,21 +12,21 @@ - - - - + + + + + - + - - +

    Minimization plots

    -
    prm_vs_iteration(xpdb_ex_pk, labeller = 'label_value')
    +
    prm_vs_iteration(xpdb_ex_pk, labeller = 'label_value')

    -
    grd_vs_iteration(xpdb_ex_pk, labeller = 'label_value')
    +
    grd_vs_iteration(xpdb_ex_pk, labeller = 'label_value')

    Individual plots

    -
    ind_plots(xpdb_ex_pk, page = 1)
    +
    ind_plots(xpdb_ex_pk, page = 1)

    @@ -192,25 +192,25 @@

    Histograms and density plots

    -
    prm_distrib(xpdb_ex_pk)
    +
    prm_distrib(xpdb_ex_pk)

    -
    eta_distrib(xpdb_ex_pk)
    +
    eta_distrib(xpdb_ex_pk)

    -
    res_distrib(xpdb_ex_pk)
    +
    res_distrib(xpdb_ex_pk)

    -
    cov_distrib(xpdb_ex_pk)
    +
    cov_distrib(xpdb_ex_pk)

    QQ plots

    -
    prm_qq(xpdb_ex_pk)
    +
    prm_qq(xpdb_ex_pk)

    -
    eta_qq(xpdb_ex_pk)
    +
    eta_qq(xpdb_ex_pk)

    -
    res_qq(xpdb_ex_pk)
    +
    res_qq(xpdb_ex_pk)

    -
    cov_qq(xpdb_ex_pk)
    +
    cov_qq(xpdb_ex_pk)

    @@ -220,7 +220,7 @@

    Compartment’s amount

    -
    amt_vs_idv(xpdb_ex_pk, nrow = 2, ncol = 1)
    +
    amt_vs_idv(xpdb_ex_pk, nrow = 2, ncol = 1)

    @@ -230,45 +230,33 @@

    Continuous vpc

    -
    xpdb_ex_pk %>% 
    - vpc_data(opt = vpc_opt(n_bins = 7)) %>% 
    - vpc()
    +
    xpdb_ex_pk %>%
    + vpc_data(opt = vpc_opt(n_bins = 7)) %>%
    + vpc()

    Censored vpc

    -
    xpdb_ex_pk %>% 
    - vpc_data(vpc_type = 'censored', opt = vpc_opt(lloq = 1, n_bins = 7)) %>% 
    - vpc()
    -
    Warning: Points (type = 'p') can only be added with continuous VPC.
    -

    +
    xpdb_ex_pk %>%
    + vpc_data(vpc_type = 'censored', opt = vpc_opt(lloq = 1, n_bins = 7)) %>%
    + vpc()

    Categorical vpc

    -
    xpdb_ex_pk %>% 
    - vpc_data(vpc_type = 'categorical') %>% 
    - vpc()
    +
    xpdb_ex_pk %>%
    + vpc_data(vpc_type = 'categorical') %>%
    + vpc()

    - @@ -279,7 +267,7 @@

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-10-1.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-10-1.png index 111acb52..be93a9d8 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-10-1.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-10-1.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-11-1.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-11-1.png index 6d389721..c34dd380 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-11-1.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-1.png index 321acc3a..dba5b4e0 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-1.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-1.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-2.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-2.png index 7b29b575..ccaa16b3 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-2.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-2.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-3.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-3.png index e5f74fe5..7fd124d2 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-3.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-3.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-4.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-4.png index 8a1dc91a..f78f8b71 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-4.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-2-4.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-3-1.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-3-1.png index abc02d27..a6a779b4 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-3-1.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-3-1.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-3-2.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-3-2.png index d2a1b89c..4f6e5021 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-3-2.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-3-2.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-1.png index c07709b4..56a82b71 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-2.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-2.png index f6b580c0..03d902f9 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-2.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-2.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-3.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-3.png index a26eb963..2a09ebac 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-3.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-3.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-4.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-4.png index 1b60704a..b78a0014 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-4.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-4-4.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-5-1.png index 757dbd69..e70325be 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-5-2.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-5-2.png index 6fe11928..eb6af052 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-5-2.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-5-2.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-6-1.png index 1b838ab2..b4a87568 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-1.png index 227ca52b..17509294 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-1.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-2.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-2.png index 245200f0..565b9045 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-2.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-2.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-3.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-3.png index 95db7188..5f6776f9 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-3.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-3.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-4.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-4.png index f68cf42d..26239d8e 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-4.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-7-4.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-1.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-1.png index 8dd19ddd..36170188 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-1.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-1.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-2.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-2.png index 2d77afbe..babadf65 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-2.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-2.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-3.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-3.png index 9f9ad558..771aae05 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-3.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-3.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-4.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-4.png index 4f5a9ac3..3d57bb92 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-4.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-8-4.png differ diff --git a/docs/articles/plot_list_files/figure-html/unnamed-chunk-9-1.png b/docs/articles/plot_list_files/figure-html/unnamed-chunk-9-1.png index eb4c49fb..53fb4737 100644 Binary files a/docs/articles/plot_list_files/figure-html/unnamed-chunk-9-1.png and b/docs/articles/plot_list_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/docs/articles/vpc.html b/docs/articles/vpc.html index 7a7bfd42..34cf45af 100644 --- a/docs/articles/vpc.html +++ b/docs/articles/vpc.html @@ -12,21 +12,21 @@ - - - - + + + + + - + - - +

    @@ -202,11 +200,10 @@

  • The stratify options defines up to two stratifying variable to be used when computing the VPC data. The stratify variables can either be provided as a character vector (stratify = c('SEX', 'MED1')) or a formula (stratify = SEX~MED1) . The former will result in the use of ggforce::facet_wrap_paginate() and the latter of ggforce::facet_grid_paginate() when creating the plot. With “categorical” VPC the “group” variable will also be added by default.
  • More advanced options (i.e. binning, pi, ci, predcorr, lloq, etc.) are accessible via the opt argument. The opt argument expects the output from the vpc_opt() functions argument.
  • -
    xpdb_ex_pk %>% 
    - vpc_data(vpc_type = 'censored', stratify = 'SEX',
    -          opt = vpc_opt(bins = 'jenks', n_bins = 7, lloq = 0.5)) %>% 
    - vpc()
    -

    +
    xpdb_ex_pk %>%
    + vpc_data(vpc_type = 'censored', stratify = 'SEX',
    +          opt = vpc_opt(bins = 'jenks', n_bins = 7, lloq = 0.5)) %>%
    + vpc()

    @@ -223,37 +220,37 @@

    Creating VPC using the xpdb data

    To create VPC using the xpdb data, at least one simulation and one estimation problem need to present. Hence in the case of NONMEM the run used to generate the xpdb should contain several$PROBLEM. In vpc_data() the problem number can be specified for the observation (obs_problem) and the simulation (sim_problem). By default xpose picks the last one of each to generate the VPC.

    -
    # View the xpdb content and data problems
    -xpdb_ex_pk
    +
    # View the xpdb content and data problems
    +xpdb_ex_pk
    run001.lst overview: 
      - Software: nonmem 7.3.0 
    - - Attached files (memory usage 1.3 Mb): 
    + - Attached files (memory usage 1.4 Mb): 
        + obs tabs: $prob no.1: catab001.csv, cotab001, patab001, sdtab001 
        + sim tabs: $prob no.2: simtab001.zip 
        + output files: run001.cor, run001.cov, run001.ext, run001.grd, run001.phi, run001.shk 
        + special: <none> 
      - gg_theme: theme_readable 
      - xp_theme: theme_xp_default 
    - - Options: dir = analysis/models/pk/, quiet = FALSE, manual_import = NULL
    -
    # Generate the vpc
    -xpdb_ex_pk %>% 
    - vpc_data(vpc_type = 'continuous', obs_problem = 1, sim_problem = 2) %>% 
    - vpc()
    + - Options: dir = data, quiet = FALSE, manual_import = NULL
    +
    # Generate the vpc
    +xpdb_ex_pk %>%
    + vpc_data(vpc_type = 'continuous', obs_problem = 1, sim_problem = 2) %>%
    + vpc()

    Creating the VPC using a PsN folder

    -

    The vpc_data() contains an argument psn_foler which can be used to point to a PsN generated VPC folder. As in most xpose function template_titles keywords can be used to automatize the process e.g. psn_folder = '@dir/@run_vpc' where @dir and @run will be automatically translated to initial (i.e. when the xpdb was generated) run directory and run number 'analysis/models/pk/run001_vpc'.

    +

    The vpc_data() contains an argument psn_folder which can be used to point to a PsN generated VPC folder. As in most xpose function template_titles keywords can be used to automatize the process e.g. psn_folder = '@dir/@run_vpc' where @dir and @run will be automatically translated to initial (i.e. when the xpdb was generated) run directory and run number 'analysis/models/pk/run001_vpc'.

    In this case, the data will be read from the /m1 sub-folder (or m1.zip if compressed). Note that PsN drops unused columns to reduce the simtab file size. Thus, in order to allow for more flexibility in R, it is recommended to use multiple stratifying variables (-stratify_on=VAR1,VAR2) and the prediction corrected (-predcorr adds the PRED column to the output) options in PsN to avoid having to rerun PsN to add these variables later on. In addition, -dv, -idv, -lloq, -uloq, -predcorr and -stratify_on PsN options are automatically applied to xpose VPC.

    The PsN generated binning can also applied to xpose VPC with the vpc_data() option psn_bins = TRUE (disabled by default). However PsN and the vpc package work slightly differently so the results may not be optimal and the output should be evaluated carefully.

    -
    xpdb_ex_pk %>% 
    - vpc_data(psn_folder = '@dir/run001_vpc', psn_bins = TRUE) %>% 
    - vpc()
    +
    xpdb_ex_pk %>%
    + vpc_data(psn_folder = '@dir/run001_vpc', psn_bins = TRUE) %>%
    + vpc()
    -
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    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 4d873603..d72d0972 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 4d873603..d72d0972 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 20a9f5cb..cefe4032 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 c79837a5..bffe2a33 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 ac891aa7..6994804a 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 4d873603..d72d0972 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/authors.html b/docs/authors.html index 64988272..0d5cefbd 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -46,7 +50,6 @@ - @@ -64,7 +67,7 @@ - +
    @@ -201,7 +204,7 @@

    Authors

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css new file mode 100644 index 00000000..5a859415 --- /dev/null +++ b/docs/bootstrap-toc.css @@ -0,0 +1,60 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ + +/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ + +/* All levels of nav */ +nav[data-toggle='toc'] .nav > li > a { + display: block; + padding: 4px 20px; + font-size: 13px; + font-weight: 500; + color: #767676; +} +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 19px; + color: #563d7c; + text-decoration: none; + background-color: transparent; + border-left: 1px solid #563d7c; +} +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 18px; + font-weight: bold; + color: #563d7c; + background-color: transparent; + border-left: 2px solid #563d7c; +} + +/* Nav: second level (shown on .active) */ +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} +nav[data-toggle='toc'] .nav .nav > li > a { + padding-top: 1px; + padding-bottom: 1px; + padding-left: 30px; + font-size: 12px; + font-weight: normal; +} +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 29px; +} +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 28px; + font-weight: 500; +} + +/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ +nav[data-toggle='toc'] .nav > .active > ul { + display: block; +} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js new file mode 100644 index 00000000..1cdd573b --- /dev/null +++ b/docs/bootstrap-toc.js @@ -0,0 +1,159 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ +(function() { + 'use strict'; + + window.Toc = { + helpers: { + // return all matching elements in the set, or their descendants + findOrFilter: function($el, selector) { + // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ + // http://stackoverflow.com/a/12731439/358804 + var $descendants = $el.find(selector); + return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); + }, + + generateUniqueIdBase: function(el) { + var text = $(el).text(); + var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); + return anchor || el.tagName.toLowerCase(); + }, + + generateUniqueId: function(el) { + var anchorBase = this.generateUniqueIdBase(el); + for (var i = 0; ; i++) { + var anchor = anchorBase; + if (i > 0) { + // add suffix + anchor += '-' + i; + } + // check if ID already exists + if (!document.getElementById(anchor)) { + return anchor; + } + } + }, + + generateAnchor: function(el) { + if (el.id) { + return el.id; + } else { + var anchor = this.generateUniqueId(el); + el.id = anchor; + return anchor; + } + }, + + createNavList: function() { + return $(''); + }, + + createChildNavList: function($parent) { + var $childList = this.createNavList(); + $parent.append($childList); + return $childList; + }, + + generateNavEl: function(anchor, text) { + var $a = $(''); + $a.attr('href', '#' + anchor); + $a.text(text); + var $li = $('
  • '); + $li.append($a); + return $li; + }, + + generateNavItem: function(headingEl) { + var anchor = this.generateAnchor(headingEl); + var $heading = $(headingEl); + var text = $heading.data('toc-text') || $heading.text(); + return this.generateNavEl(anchor, text); + }, + + // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). + getTopLevel: function($scope) { + for (var i = 1; i <= 6; i++) { + var $headings = this.findOrFilter($scope, 'h' + i); + if ($headings.length > 1) { + return i; + } + } + + return 1; + }, + + // returns the elements for the top level, and the next below it + getHeadings: function($scope, topLevel) { + var topSelector = 'h' + topLevel; + + var secondaryLevel = topLevel + 1; + var secondarySelector = 'h' + secondaryLevel; + + return this.findOrFilter($scope, topSelector + ',' + secondarySelector); + }, + + getNavLevel: function(el) { + return parseInt(el.tagName.charAt(1), 10); + }, + + populateNav: function($topContext, topLevel, $headings) { + var $context = $topContext; + var $prevNav; + + var helpers = this; + $headings.each(function(i, el) { + var $newNav = helpers.generateNavItem(el); + var navLevel = helpers.getNavLevel(el); + + // determine the proper $context + if (navLevel === topLevel) { + // use top level + $context = $topContext; + } else if ($prevNav && $context === $topContext) { + // create a new level of the tree and switch to it + $context = helpers.createChildNavList($prevNav); + } // else use the current $context + + $context.append($newNav); + + $prevNav = $newNav; + }); + }, + + parseOps: function(arg) { + var opts; + if (arg.jquery) { + opts = { + $nav: arg + }; + } else { + opts = arg; + } + opts.$scope = opts.$scope || $(document.body); + return opts; + } + }, + + // accepts a jQuery object, or an options object + init: function(opts) { + opts = this.helpers.parseOps(opts); + + // ensure that the data attribute is in place for styling + opts.$nav.attr('data-toggle', 'toc'); + + var $topContext = this.helpers.createChildNavList(opts.$nav); + var topLevel = this.helpers.getTopLevel(opts.$scope); + var $headings = this.helpers.getHeadings(opts.$scope, topLevel); + this.helpers.populateNav($topContext, topLevel, $headings); + } + }; + + $(function() { + $('nav[data-toggle="toc"]').each(function(i, el) { + var $nav = $(el); + Toc.init($nav); + }); + }); +})(); diff --git a/docs/index.html b/docs/index.html index c78bfe3d..8bd0426e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,10 +12,11 @@ - - - - + + + + + - - +
    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/amt_vs_idv-1.png b/docs/reference/amt_vs_idv-1.png index d62d10eb..0be4f2fa 100644 Binary files a/docs/reference/amt_vs_idv-1.png and b/docs/reference/amt_vs_idv-1.png differ diff --git a/docs/reference/amt_vs_idv.html b/docs/reference/amt_vs_idv.html index 2daef739..10e470c5 100644 --- a/docs/reference/amt_vs_idv.html +++ b/docs/reference/amt_vs_idv.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -311,17 +314,10 @@

    Examp
    amt_vs_idv(xpdb_ex_pk, nrow = 2, ncol = 1)
    #> Using data from $prob no.1
    #> Tidying data by ID, SEX, MED1, MED2, AMT ... and 20 more variables

    - @@ -332,7 +328,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/append_suffix.html b/docs/reference/append_suffix.html index b69da160..80c3a037 100644 --- a/docs/reference/append_suffix.html +++ b/docs/reference/append_suffix.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -198,13 +201,10 @@

    Value

    The modified `string`.

    - @@ -215,7 +215,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/as.ctime.html b/docs/reference/as.ctime.html index 1d7c3389..7fc7e139 100644 --- a/docs/reference/as.ctime.html +++ b/docs/reference/as.ctime.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -189,13 +192,10 @@

    Value

    A string of time in `hh:mm:ss`.

    - @@ -206,7 +206,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/as.nm.table.list.html b/docs/reference/as.nm.table.list.html index 1d679f2c..770e65ef 100644 --- a/docs/reference/as.nm.table.list.html +++ b/docs/reference/as.nm.table.list.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -189,13 +192,10 @@

    Value

    x with `nm_table_list` class.

    - @@ -206,7 +206,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/as.xpdb.html b/docs/reference/as.xpdb.html index cf371673..57c8be73 100644 --- a/docs/reference/as.xpdb.html +++ b/docs/reference/as.xpdb.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -189,13 +192,10 @@

    Value

    x with `xpose_data` class.

    - @@ -206,7 +206,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/as.xpose.plot.html b/docs/reference/as.xpose.plot.html index 88ab7eb0..99d9b7a9 100644 --- a/docs/reference/as.xpose.plot.html +++ b/docs/reference/as.xpose.plot.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -189,13 +192,10 @@

    Value

    x with `xpose_plot` class.

    - @@ -206,7 +206,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/as.xpose.theme.html b/docs/reference/as.xpose.theme.html index 19dde817..92c458c7 100644 --- a/docs/reference/as.xpose.theme.html +++ b/docs/reference/as.xpose.theme.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -189,13 +192,10 @@

    Value

    x with `xpose_theme` class.

    - @@ -206,7 +206,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/check_plot_type.html b/docs/reference/check_plot_type.html index 06e88b4f..f4d35167 100644 --- a/docs/reference/check_plot_type.html +++ b/docs/reference/check_plot_type.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -193,13 +196,10 @@

    Value

    Silent if proper user input else warns for unrecognized `type`.

    - @@ -210,7 +210,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/check_problem.html b/docs/reference/check_problem.html index 04786cad..3e97c49e 100644 --- a/docs/reference/check_problem.html +++ b/docs/reference/check_problem.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -198,12 +201,10 @@

    Arg

    - @@ -214,7 +215,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/check_quo_vars.html b/docs/reference/check_quo_vars.html index f42d4061..e293cf14 100644 --- a/docs/reference/check_quo_vars.html +++ b/docs/reference/check_quo_vars.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -204,13 +207,10 @@

    Value

    Silent if checks are successful, returns errors otherwise.

    - @@ -221,7 +221,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/check_scales.html b/docs/reference/check_scales.html index dcb969d5..3b33a2de 100644 --- a/docs/reference/check_scales.html +++ b/docs/reference/check_scales.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -194,13 +197,10 @@

    Value

    A string taking `continuous` or `log10` as value.

    - @@ -211,7 +211,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/check_xpdb.html b/docs/reference/check_xpdb.html index 1e2d2957..97217ed8 100644 --- a/docs/reference/check_xpdb.html +++ b/docs/reference/check_xpdb.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -195,13 +198,10 @@

    Value

    Silent if successful check, else returns error.

    - @@ -212,7 +212,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/combine_tables.html b/docs/reference/combine_tables.html index 3dca3f29..c13d784e 100644 --- a/docs/reference/combine_tables.html +++ b/docs/reference/combine_tables.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -191,13 +194,10 @@

    Value

    A list containing `data` and `index` of the combined table.

    - @@ -208,7 +208,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/data_opt.html b/docs/reference/data_opt.html index 3a681e9d..7ae59d80 100644 --- a/docs/reference/data_opt.html +++ b/docs/reference/data_opt.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -275,14 +278,10 @@

    Examp #>

    - @@ -293,7 +292,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/default_plot_problem.html b/docs/reference/default_plot_problem.html index cdfe519b..056cfa86 100644 --- a/docs/reference/default_plot_problem.html +++ b/docs/reference/default_plot_problem.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -192,13 +195,10 @@

    Value

    else the last simulation problem as an integer.

    - @@ -209,7 +209,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/distrib_plot-1.png b/docs/reference/distrib_plot-1.png index 276859e8..c14c54d7 100644 Binary files a/docs/reference/distrib_plot-1.png and b/docs/reference/distrib_plot-1.png differ diff --git a/docs/reference/distrib_plot-2.png b/docs/reference/distrib_plot-2.png index dd2c5cbe..2eddc6e4 100644 Binary files a/docs/reference/distrib_plot-2.png and b/docs/reference/distrib_plot-2.png differ diff --git a/docs/reference/distrib_plot-3.png b/docs/reference/distrib_plot-3.png index f716869b..a18210da 100644 Binary files a/docs/reference/distrib_plot-3.png and b/docs/reference/distrib_plot-3.png differ diff --git a/docs/reference/distrib_plot-4.png b/docs/reference/distrib_plot-4.png index 7f0e20ce..d6804b06 100644 Binary files a/docs/reference/distrib_plot-4.png and b/docs/reference/distrib_plot-4.png differ diff --git a/docs/reference/distrib_plot.html b/docs/reference/distrib_plot.html index 3fcd1e6a..308d1e88 100644 --- a/docs/reference/distrib_plot.html +++ b/docs/reference/distrib_plot.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -370,17 +373,10 @@

    Examp # Density plot of continuous covariates cov_distrib(xpdb_ex_pk, type = 'd')

    #> Using data from $prob no.1
    #> Removing duplicated rows based on: ID
    #> Tidying data by ID, SEX, MED1, MED2, DOSE ... and 23 more variables
    - @@ -391,7 +387,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/drop_fixed_cols.html b/docs/reference/drop_fixed_cols.html index 64afe550..ec845dbb 100644 --- a/docs/reference/drop_fixed_cols.html +++ b/docs/reference/drop_fixed_cols.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -202,13 +205,10 @@

    Value

    value was found in the data.

    - @@ -219,7 +219,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/dv_vs_pred-1.png b/docs/reference/dv_vs_pred-1.png index 4baf6956..c5781ba3 100644 Binary files a/docs/reference/dv_vs_pred-1.png and b/docs/reference/dv_vs_pred-1.png differ diff --git a/docs/reference/dv_vs_pred-2.png b/docs/reference/dv_vs_pred-2.png index d7dd9b45..ce69af20 100644 Binary files a/docs/reference/dv_vs_pred-2.png and b/docs/reference/dv_vs_pred-2.png differ diff --git a/docs/reference/dv_vs_pred.html b/docs/reference/dv_vs_pred.html index a5bc2939..341246d5 100644 --- a/docs/reference/dv_vs_pred.html +++ b/docs/reference/dv_vs_pred.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -330,17 +333,10 @@

    Examp dv_vs_ipred(xpdb_ex_pk)

    #> Using data from $prob no.1
    #> Filtering data by EVID == 0
    #> `geom_smooth()` using formula 'y ~ x'
    #> `geom_smooth()` using formula 'y ~ x'
    - @@ -351,7 +347,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/edit_xpose_data.html b/docs/reference/edit_xpose_data.html index 8e8ee0e6..bd031b2e 100644 --- a/docs/reference/edit_xpose_data.html +++ b/docs/reference/edit_xpose_data.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -215,12 +218,10 @@

    Arg

    - @@ -231,7 +232,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/fetch_data.html b/docs/reference/fetch_data.html index fac2c9a0..f16de2d2 100644 --- a/docs/reference/fetch_data.html +++ b/docs/reference/fetch_data.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -253,13 +256,10 @@

    Value

    A tibble

    - @@ -270,7 +270,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/file_path.html b/docs/reference/file_path.html index c73071ad..f7273c38 100644 --- a/docs/reference/file_path.html +++ b/docs/reference/file_path.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -195,13 +198,10 @@

    Value

    A string or vector of string of the full file path.

    - @@ -212,7 +212,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/filter_xp_theme.html b/docs/reference/filter_xp_theme.html index 71e91f54..76e44643 100644 --- a/docs/reference/filter_xp_theme.html +++ b/docs/reference/filter_xp_theme.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -199,13 +202,10 @@

    Value

    A modified `xp_theme`

    - @@ -216,7 +216,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/get_code.html b/docs/reference/get_code.html index d06fff89..9402a60f 100644 --- a/docs/reference/get_code.html +++ b/docs/reference/get_code.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -199,31 +202,26 @@

    See a

    Examples

    parsed_model <- get_code(xpdb_ex_pk) -parsed_model
    #> # A tibble: 764 x 5 +parsed_model
    #> # A tibble: 764 x 5 #> 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: 00… -#> 3 0 0 oth "" "; 2. Description:… -#> 4 0 0 oth "" "; NONMEM PK examp… -#> 5 1 1 pro "Parameter estimation" "" -#> 6 1 2 inp "ID DOSE DV SCR AGE SEX CLASS W… "" -#> 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
    +#> * <int> <int> <chr> <chr> <chr> +#> 1 0 0 oth "Mon Oct 16 13:34:28 CEST 2017" "" +#> 2 0 0 oth "" "; 1. Based on: 00… +#> 3 0 0 oth "" "; 2. Description:… +#> 4 0 0 oth "" "; NONMEM PK examp… +#> 5 1 1 pro "Parameter estimation" "" +#> 6 1 2 inp "ID DOSE DV SCR AGE SEX CLASS W… "" +#> 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
    - @@ -234,7 +232,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/get_data.html b/docs/reference/get_data.html index 806c32df..c9b7026c 100644 --- a/docs/reference/get_data.html +++ b/docs/reference/get_data.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -209,62 +212,57 @@

    See a

    Examples

    # By table name sdtab <- get_data(xpdb_ex_pk, 'sdtab001') -sdtab
    #> # A tibble: 550 x 18 +sdtab
    #> # A tibble: 550 x 18 #> ID DOSE AMT SS II TIME TAD IPRED CWRES CPRED IWRES EVID -#> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> -#> 1 110 200 100 0 0 0 0 0 0 0 0 1 -#> 2 110 200 0 0 0 1 1 0.214 -2.83 0.584 2.40 0 -#> 3 110 200 0 0 0 1.5 1.5 0.296 -1.62 0.737 1.03 0 -#> 4 110 200 0 0 0 2 2 0.349 1.10 0.790 -1.71 0 -#> 5 110 200 0 0 0 4 4 0.392 0.585 0.588 -0.861 0 -#> 6 110 200 0 0 0 6 6 0.329 -0.0262 0.304 0.0457 0 -#> 7 110 200 0 0 0 8 8 0.249 0.0940 0.127 0.0132 0 -#> 8 112 200 100 0 0 0 0 0 0 0 0 1 -#> 9 112 200 0 0 0 0.5 0.5 0.556 0.0341 0.627 -0.275 0 -#> 10 112 200 0 0 0 1 1 0.712 -0.417 0.788 0.163 0 -#> # … with 540 more rows, and 6 more variables: A1 <dbl>, A2 <dbl>, DV <dbl>, -#> # PRED <dbl>, RES <dbl>, WRES <dbl>
    +#> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> +#> 1 110 200 100 0 0 0 0 0 0 0 0 1 +#> 2 110 200 0 0 0 1 1 0.214 -2.83 0.584 2.40 0 +#> 3 110 200 0 0 0 1.5 1.5 0.296 -1.62 0.737 1.03 0 +#> 4 110 200 0 0 0 2 2 0.349 1.10 0.790 -1.71 0 +#> 5 110 200 0 0 0 4 4 0.392 0.585 0.588 -0.861 0 +#> 6 110 200 0 0 0 6 6 0.329 -0.0262 0.304 0.0457 0 +#> 7 110 200 0 0 0 8 8 0.249 0.0940 0.127 0.0132 0 +#> 8 112 200 100 0 0 0 0 0 0 0 0 1 +#> 9 112 200 0 0 0 0.5 0.5 0.556 0.0341 0.627 -0.275 0 +#> 10 112 200 0 0 0 1 1 0.712 -0.417 0.788 0.163 0 +#> # … with 540 more rows, and 6 more variables: A1 <dbl>, A2 <dbl>, DV <dbl>, +#> # PRED <dbl>, RES <dbl>, WRES <dbl>
    # By problem tables <- get_data(xpdb_ex_pk, .problem = 1) -tables
    #> # A tibble: 550 x 31 +tables
    #> # A tibble: 550 x 31 #> ID SEX MED1 MED2 DOSE AMT SS II TIME TAD IPRED CWRES -#> <fct> <fct> <fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> -#> 1 110 1 0 1 200 100 0 0 0 0 0 0 -#> 2 110 1 0 1 200 0 0 0 1 1 0.214 -2.83 -#> 3 110 1 0 1 200 0 0 0 1.5 1.5 0.296 -1.62 -#> 4 110 1 0 1 200 0 0 0 2 2 0.349 1.10 -#> 5 110 1 0 1 200 0 0 0 4 4 0.392 0.585 -#> 6 110 1 0 1 200 0 0 0 6 6 0.329 -0.0262 -#> 7 110 1 0 1 200 0 0 0 8 8 0.249 0.0940 -#> 8 112 1 1 1 200 100 0 0 0 0 0 0 -#> 9 112 1 1 1 200 0 0 0 0.5 0.5 0.556 0.0341 -#> 10 112 1 1 1 200 0 0 0 1 1 0.712 -0.417 -#> # … with 540 more rows, and 19 more variables: CPRED <dbl>, IWRES <dbl>, -#> # EVID <dbl>, A1 <dbl>, A2 <dbl>, DV <dbl>, PRED <dbl>, RES <dbl>, -#> # WRES <dbl>, CLCR <dbl>, AGE <dbl>, WT <dbl>, KA <dbl>, CL <dbl>, V <dbl>, -#> # ALAG1 <dbl>, ETA1 <dbl>, ETA2 <dbl>, ETA3 <dbl>
    +#> <fct> <fct> <fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> +#> 1 110 1 0 1 200 100 0 0 0 0 0 0 +#> 2 110 1 0 1 200 0 0 0 1 1 0.214 -2.83 +#> 3 110 1 0 1 200 0 0 0 1.5 1.5 0.296 -1.62 +#> 4 110 1 0 1 200 0 0 0 2 2 0.349 1.10 +#> 5 110 1 0 1 200 0 0 0 4 4 0.392 0.585 +#> 6 110 1 0 1 200 0 0 0 6 6 0.329 -0.0262 +#> 7 110 1 0 1 200 0 0 0 8 8 0.249 0.0940 +#> 8 112 1 1 1 200 100 0 0 0 0 0 0 +#> 9 112 1 1 1 200 0 0 0 0.5 0.5 0.556 0.0341 +#> 10 112 1 1 1 200 0 0 0 1 1 0.712 -0.417 +#> # … with 540 more rows, and 19 more variables: CPRED <dbl>, IWRES <dbl>, +#> # EVID <dbl>, A1 <dbl>, A2 <dbl>, DV <dbl>, PRED <dbl>, RES <dbl>, +#> # WRES <dbl>, CLCR <dbl>, AGE <dbl>, WT <dbl>, KA <dbl>, CL <dbl>, V <dbl>, +#> # ALAG1 <dbl>, ETA1 <dbl>, ETA2 <dbl>, ETA3 <dbl>
    # Tip to list available tables in the xpdb print(xpdb_ex_pk)
    #> run001.lst overview: #> - Software: nonmem 7.3.0 -#> - Attached files (memory usage 1.3 Mb): +#> - Attached files (memory usage 1.4 Mb): #> + obs tabs: $prob no.1: catab001.csv, cotab001, patab001, sdtab001 #> + sim tabs: $prob no.2: simtab001.zip #> + output files: run001.cor, run001.cov, run001.ext, run001.grd, run001.phi, run001.shk #> + special: <none> #> - gg_theme: theme_readable #> - xp_theme: theme_xp_default -#> - Options: dir = analysis/models/pk/, quiet = FALSE, manual_import = NULL
    +#> - Options: dir = data, quiet = FALSE, manual_import = NULL
    - @@ -275,7 +273,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/get_extension.html b/docs/reference/get_extension.html index 466a82e4..7b110736 100644 --- a/docs/reference/get_extension.html +++ b/docs/reference/get_extension.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -194,13 +197,10 @@

    Value

    A string or vector of string of the file(s) extension.

    - @@ -211,7 +211,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/get_file.html b/docs/reference/get_file.html index fa2a0e30..47ae17ef 100644 --- a/docs/reference/get_file.html +++ b/docs/reference/get_file.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -226,80 +229,75 @@

    See a

    Examples

    # Single file (returns a tibble) -ext_file <- get_file(xpdb_ex_pk, file = 'run001.ext')
    #> Returning data from run001.ext, $prob no.1, subprob no.0, method foce
    ext_file
    #> # A tibble: 28 x 16 +ext_file <- get_file(xpdb_ex_pk, file = 'run001.ext')
    #> Returning data from run001.ext, $prob no.1, subprob no.0, method foce
    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.4 1.47 7.45 0.214 0.200 0.00983 0.00601 1 -#> 2 1 26.3 1.26 7.35 0.219 0.217 0.00989 0.00602 1 -#> 3 2 25.6 1.47 7.29 0.216 0.212 0.00987 0.00603 1 -#> 4 3 26.8 1.49 5.76 0.213 0.213 0.00979 0.00628 1 -#> 5 4 26.7 1.49 5.69 0.213 0.212 0.00979 0.00629 1 -#> 6 5 26.7 1.49 5.66 0.213 0.212 0.00979 0.00630 1 -#> 7 6 26.6 1.49 5.03 0.210 0.217 0.0100 0.00652 1 -#> 8 7 26.6 1.49 4.93 0.205 0.217 0.0100 0.00658 1 -#> 9 8 26.6 1.48 4.62 0.211 0.217 0.00951 0.00735 1 -#> 10 9 26.6 1.46 4.41 0.209 0.217 0.00903 0.00874 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>
    +#> <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 +#> 2 1 26.3 1.26 7.35 0.219 0.217 0.00989 0.00602 1 +#> 3 2 25.6 1.47 7.29 0.216 0.212 0.00987 0.00603 1 +#> 4 3 26.8 1.49 5.76 0.213 0.213 0.00979 0.00628 1 +#> 5 4 26.7 1.49 5.69 0.213 0.212 0.00979 0.00629 1 +#> 6 5 26.7 1.49 5.66 0.213 0.212 0.00979 0.00630 1 +#> 7 6 26.6 1.49 5.03 0.210 0.217 0.0100 0.00652 1 +#> 8 7 26.6 1.49 4.93 0.205 0.217 0.0100 0.00658 1 +#> 9 8 26.6 1.48 4.62 0.211 0.217 0.00951 0.00735 1 +#> 10 9 26.6 1.46 4.41 0.209 0.217 0.00903 0.00874 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>
    # Multiple files (returns a list) files <- get_file(xpdb_ex_pk, file = c('run001.ext', 'run001.phi'))
    #> Returning data from run001.ext, run001.phi
    files
    #> $run001.ext_prob_1_subprob_0_foce -#> # A tibble: 28 x 16 +#> # 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.4 1.47 7.45 0.214 0.200 0.00983 0.00601 1 -#> 2 1 26.3 1.26 7.35 0.219 0.217 0.00989 0.00602 1 -#> 3 2 25.6 1.47 7.29 0.216 0.212 0.00987 0.00603 1 -#> 4 3 26.8 1.49 5.76 0.213 0.213 0.00979 0.00628 1 -#> 5 4 26.7 1.49 5.69 0.213 0.212 0.00979 0.00629 1 -#> 6 5 26.7 1.49 5.66 0.213 0.212 0.00979 0.00630 1 -#> 7 6 26.6 1.49 5.03 0.210 0.217 0.0100 0.00652 1 -#> 8 7 26.6 1.49 4.93 0.205 0.217 0.0100 0.00658 1 -#> 9 8 26.6 1.48 4.62 0.211 0.217 0.00951 0.00735 1 -#> 10 9 26.6 1.46 4.41 0.209 0.217 0.00903 0.00874 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> +#> <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 +#> 2 1 26.3 1.26 7.35 0.219 0.217 0.00989 0.00602 1 +#> 3 2 25.6 1.47 7.29 0.216 0.212 0.00987 0.00603 1 +#> 4 3 26.8 1.49 5.76 0.213 0.213 0.00979 0.00628 1 +#> 5 4 26.7 1.49 5.69 0.213 0.212 0.00979 0.00629 1 +#> 6 5 26.7 1.49 5.66 0.213 0.212 0.00979 0.00630 1 +#> 7 6 26.6 1.49 5.03 0.210 0.217 0.0100 0.00652 1 +#> 8 7 26.6 1.49 4.93 0.205 0.217 0.0100 0.00658 1 +#> 9 8 26.6 1.48 4.62 0.211 0.217 0.00951 0.00735 1 +#> 10 9 26.6 1.46 4.41 0.209 0.217 0.00903 0.00874 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> #> #> $run001.phi_prob_1_subprob_0_foce -#> # A tibble: 74 x 12 +#> # A tibble: 74 x 12 #> SUBJECT_NO ID `ETA(1)` `ETA(2)` `ETA(3)` `ETC(1,1)` `ETC(2,1)` `ETC(2,2)` -#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> -#> 1 1 110 -0.0370 -0.00596 -2.14 0.0258 -0.00961 0.0339 -#> 2 2 112 -0.0495 0.122 -0.0235 0.0140 -0.00219 0.0138 -#> 3 3 113 0.332 0.0259 -1.15 0.00995 0.000300 0.0257 -#> 4 4 121 0.304 0.249 1.89 0.00741 0.00362 0.0137 -#> 5 5 123 0.0271 -0.0801 1.09 0.00794 0.00267 0.0135 -#> 6 6 124 0.332 0.111 -1.54 0.0110 -0.00219 0.0307 -#> 7 7 126 0.190 -0.0315 2.20 0.00785 0.00300 0.0136 -#> 8 8 127 0.190 -0.0750 0.415 0.0112 0.00469 0.0153 -#> 9 9 128 -0.0138 -0.00130 -1.27 0.0120 0.0000333 0.0287 -#> 10 10 210 -0.307 -0.108 -0.0168 0.00988 0.00112 0.0163 -#> # … with 64 more rows, and 4 more variables: `ETC(3,1)` <dbl>, -#> # `ETC(3,2)` <dbl>, `ETC(3,3)` <dbl>, OBJ <dbl> +#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> +#> 1 1 110 -0.0370 -0.00596 -2.14 0.0258 -0.00961 0.0339 +#> 2 2 112 -0.0495 0.122 -0.0235 0.0140 -0.00219 0.0138 +#> 3 3 113 0.332 0.0259 -1.15 0.00995 0.000300 0.0257 +#> 4 4 121 0.304 0.249 1.89 0.00741 0.00362 0.0137 +#> 5 5 123 0.0271 -0.0801 1.09 0.00794 0.00267 0.0135 +#> 6 6 124 0.332 0.111 -1.54 0.0110 -0.00219 0.0307 +#> 7 7 126 0.190 -0.0315 2.20 0.00785 0.00300 0.0136 +#> 8 8 127 0.190 -0.0750 0.415 0.0112 0.00469 0.0153 +#> 9 9 128 -0.0138 -0.00130 -1.27 0.0120 0.0000333 0.0287 +#> 10 10 210 -0.307 -0.108 -0.0168 0.00988 0.00112 0.0163 +#> # … with 64 more rows, and 4 more variables: `ETC(3,1)` <dbl>, +#> # `ETC(3,2)` <dbl>, `ETC(3,3)` <dbl>, OBJ <dbl> #>
    # Tip to list available files in the xpdb print(xpdb_ex_pk)
    #> run001.lst overview: #> - Software: nonmem 7.3.0 -#> - Attached files (memory usage 1.3 Mb): +#> - Attached files (memory usage 1.4 Mb): #> + obs tabs: $prob no.1: catab001.csv, cotab001, patab001, sdtab001 #> + sim tabs: $prob no.2: simtab001.zip #> + output files: run001.cor, run001.cov, run001.ext, run001.grd, run001.phi, run001.shk #> + special: <none> #> - gg_theme: theme_readable #> - xp_theme: theme_xp_default -#> - Options: dir = analysis/models/pk/, quiet = FALSE, manual_import = NULL
    +#> - Options: dir = data, quiet = FALSE, manual_import = NULL
    - @@ -310,7 +308,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/get_prm.html b/docs/reference/get_prm.html index e97ccba4..c53e7427 100644 --- a/docs/reference/get_prm.html +++ b/docs/reference/get_prm.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -252,15 +255,10 @@

    Examp #> SIGMA(1,1) 1 fix -

    - @@ -271,7 +269,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/get_prm_transformation_formulas.html b/docs/reference/get_prm_transformation_formulas.html index cb09d11e..0b35f7a7 100644 --- a/docs/reference/get_prm_transformation_formulas.html +++ b/docs/reference/get_prm_transformation_formulas.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -189,13 +192,10 @@

    Value

    List of formulas decribing the transformation

    - @@ -206,7 +206,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/get_special.html b/docs/reference/get_special.html index f48ac667..d0d7cd05 100644 --- a/docs/reference/get_special.html +++ b/docs/reference/get_special.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -201,31 +204,26 @@

    See a

    Examples

    special <- get_summary(xpdb_ex_pk) -special
    #> # A tibble: 48 x 5 +special
    #> # A tibble: 48 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 -#> # … with 38 more rows
    +#> <dbl> <dbl> <chr> <chr> <chr> +#> 1 0 0 Run description descr NONMEM PK example for xpose +#> 2 0 0 Run directory dir data +#> 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 +#> # … with 38 more rows
    - @@ -236,7 +234,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/get_summary.html b/docs/reference/get_summary.html index 5e3c38d1..4055f90f 100644 --- a/docs/reference/get_summary.html +++ b/docs/reference/get_summary.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -206,31 +209,26 @@

    See a

    Examples

    run_summary <- get_summary(xpdb_ex_pk) -run_summary
    #> # A tibble: 48 x 5 +run_summary
    #> # A tibble: 48 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 -#> # … with 38 more rows
    +#> <dbl> <dbl> <chr> <chr> <chr> +#> 1 0 0 Run description descr NONMEM PK example for xpose +#> 2 0 0 Run directory dir data +#> 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 +#> # … with 38 more rows
    - @@ -241,7 +239,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/gg_themes-1.png b/docs/reference/gg_themes-1.png index 353cb313..e7810e1a 100644 Binary files a/docs/reference/gg_themes-1.png and b/docs/reference/gg_themes-1.png differ diff --git a/docs/reference/gg_themes-2.png b/docs/reference/gg_themes-2.png index 3b32eda6..20f3611e 100644 Binary files a/docs/reference/gg_themes-2.png and b/docs/reference/gg_themes-2.png differ diff --git a/docs/reference/gg_themes.html b/docs/reference/gg_themes.html index 95677f1b..745b9669 100644 --- a/docs/reference/gg_themes.html +++ b/docs/reference/gg_themes.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -55,7 +59,6 @@ " /> - @@ -73,7 +76,7 @@ - +
    @@ -221,13 +224,10 @@

    Examp dv_vs_ipred(facets = 'SEX')

    #> Using data from $prob no.1
    #> Filtering data by EVID == 0
    #> `geom_smooth()` using formula 'y ~ x'
    #> `geom_smooth()` using formula 'y ~ x'
    - @@ -238,7 +238,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/grab_iter.html b/docs/reference/grab_iter.html index 944d4a15..8f124685 100644 --- a/docs/reference/grab_iter.html +++ b/docs/reference/grab_iter.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -190,12 +193,10 @@

    Arg

    - @@ -206,7 +207,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ind_plots-1.png b/docs/reference/ind_plots-1.png index 594050e8..fde7ec2c 100644 Binary files a/docs/reference/ind_plots-1.png and b/docs/reference/ind_plots-1.png differ diff --git a/docs/reference/ind_plots.html b/docs/reference/ind_plots.html index 27abfbc0..196f5dc9 100644 --- a/docs/reference/ind_plots.html +++ b/docs/reference/ind_plots.html @@ -18,23 +18,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -50,7 +54,6 @@ - @@ -68,7 +71,7 @@ - +
    @@ -331,17 +334,10 @@

    Examp ncol = 3, nrow = 3)

    #> Using data from $prob no.1
    #> Filtering data by EVID == 0
    #> Tidying data by ID, SEX, MED1, MED2, DOSE ... and 23 more variables
    - @@ -352,7 +348,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/index.html b/docs/reference/index.html index 94acb2d1..b703dea8 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -46,7 +50,6 @@ - @@ -64,7 +67,7 @@ - +
    @@ -181,6 +184,11 @@

    Import tables and output files from a NLME run to R.

    + + + + + @@ -195,6 +203,11 @@

    Manually import tables and output files from a NLME run to R.

    + + + + + @@ -233,6 +246,11 @@

    Example of xpose_data

    + + + + + @@ -247,6 +265,11 @@

    Summarize the xpdb content or the run

    + + + + + @@ -285,6 +308,11 @@

    Edit data, index or files within an xpdb

    + + + + + @@ -323,6 +351,11 @@

    Access code, data, files or summary from an xpdb object

    + + + + + @@ -367,6 +400,11 @@

    Basic goodness-of-fit plots.

    + + + + + @@ -399,6 +437,11 @@

    Indiviudal observations and model predictions profiles by the independent variable

    + + + + + @@ -414,6 +457,11 @@

    Visual predictive checks data and plot generation

    + + + + + @@ -440,6 +488,11 @@

    Covariate, parameters, etas and residuals distribution plots

    + + + + + @@ -454,6 +507,11 @@

    Covariate, parameters, etas and residuals QQ plots

    + + + + + @@ -468,6 +526,11 @@

    Plots of compartments’ amount

    + + + + + @@ -482,6 +545,11 @@

    Graphics to evaluate the estimation step

    + + + + + @@ -496,6 +564,11 @@

    Functions to manually create customized plots from an xpose_data object.

    + + + + + @@ -528,6 +601,11 @@

    Add, customize themes or template titles.

    + + + + + @@ -560,6 +638,11 @@

    Print plots to the console or save them into a file.

    + + + + + @@ -577,26 +660,10 @@

    -

    Contents

    -
    +

    @@ -607,7 +674,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/index_table.html b/docs/reference/index_table.html index cefe34e2..9611fae6 100644 --- a/docs/reference/index_table.html +++ b/docs/reference/index_table.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -190,13 +193,10 @@

    Value

    A tibble of the index.

    - @@ -207,7 +207,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/irep.html b/docs/reference/irep.html index a406bd08..cee4fae9 100644 --- a/docs/reference/irep.html +++ b/docs/reference/irep.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -196,13 +199,10 @@

    Examp mutate(sim_id = irep(ID), .problem = 2)

    #> irep: 20 simulations found.
    - @@ -213,7 +213,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/is.formula.html b/docs/reference/is.formula.html index ffe58097..bb482baf 100644 --- a/docs/reference/is.formula.html +++ b/docs/reference/is.formula.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -190,13 +193,10 @@

    Value

    and `FALSE` otherwise.

    - @@ -207,7 +207,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/is.nm.model.html b/docs/reference/is.nm.model.html index 2ad75bf5..117fa4ab 100644 --- a/docs/reference/is.nm.model.html +++ b/docs/reference/is.nm.model.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -190,13 +193,10 @@

    Value

    and `FALSE` otherwise.

    - @@ -207,7 +207,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/is.nm.table.list.html b/docs/reference/is.nm.table.list.html index b5c788a7..c2e9f4be 100644 --- a/docs/reference/is.nm.table.list.html +++ b/docs/reference/is.nm.table.list.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -190,13 +193,10 @@

    Value

    and `FALSE` otherwise.

    - @@ -207,7 +207,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/is.xpdb.html b/docs/reference/is.xpdb.html index 55c968d5..05952c89 100644 --- a/docs/reference/is.xpdb.html +++ b/docs/reference/is.xpdb.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -190,13 +193,10 @@

    Value

    and `FALSE` otherwise.

    - @@ -207,7 +207,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/is.xpose.plot.html b/docs/reference/is.xpose.plot.html index c5b8fcb6..2869d694 100644 --- a/docs/reference/is.xpose.plot.html +++ b/docs/reference/is.xpose.plot.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -190,13 +193,10 @@

    Value

    and `FALSE` otherwise.

    - @@ -207,7 +207,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/is.xpose.theme.html b/docs/reference/is.xpose.theme.html index 4487c4c9..71a74ed0 100644 --- a/docs/reference/is.xpose.theme.html +++ b/docs/reference/is.xpose.theme.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -190,13 +193,10 @@

    Value

    and `FALSE` otherwise.

    - @@ -207,7 +207,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/last_data_problem.html b/docs/reference/last_data_problem.html index bb790b71..57d246c5 100644 --- a/docs/reference/last_data_problem.html +++ b/docs/reference/last_data_problem.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -197,13 +200,10 @@

    Value

    else the last simulation problem as an integer.

    - @@ -214,7 +214,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/last_file_method.html b/docs/reference/last_file_method.html index 6d8f2b51..dc198c20 100644 --- a/docs/reference/last_file_method.html +++ b/docs/reference/last_file_method.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -202,13 +205,10 @@

    Value

    for the given `.problem` and file `ext`.

    - @@ -219,7 +219,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/last_file_problem.html b/docs/reference/last_file_problem.html index 472348df..9dcd1e59 100644 --- a/docs/reference/last_file_problem.html +++ b/docs/reference/last_file_problem.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -194,13 +197,10 @@

    Value

    for the given file `ext`.

    - @@ -211,7 +211,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/last_file_subprob.html b/docs/reference/last_file_subprob.html index eed3c620..c97eec9e 100644 --- a/docs/reference/last_file_subprob.html +++ b/docs/reference/last_file_subprob.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -198,13 +201,10 @@

    Value

    for the given `.problem` and file `ext`.

    - @@ -215,7 +215,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/list_nm_tables.html b/docs/reference/list_nm_tables.html index 8cf4333e..7bbb1763 100644 --- a/docs/reference/list_nm_tables.html +++ b/docs/reference/list_nm_tables.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -194,14 +197,10 @@

    Examp list_nm_tables() }

    - @@ -212,7 +211,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/list_nm_tables_manual.html b/docs/reference/list_nm_tables_manual.html index 7eb67c27..48860259 100644 --- a/docs/reference/list_nm_tables_manual.html +++ b/docs/reference/list_nm_tables_manual.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -201,13 +204,10 @@

    Value

    A `nm_table_list`

    - @@ -218,7 +218,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/list_vars.html b/docs/reference/list_vars.html index 6587f7fd..ce646092 100644 --- a/docs/reference/list_vars.html +++ b/docs/reference/list_vars.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -219,14 +222,10 @@

    Examp #> - Model individual predictions (ipred) : IPRED #> - Not attributed (na) : DOSE, TAD, SEX, CLCR, AGE, WT

    - @@ -237,7 +236,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/list_xpdb.html b/docs/reference/list_xpdb.html index 607a0b38..143ff38a 100644 --- a/docs/reference/list_xpdb.html +++ b/docs/reference/list_xpdb.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -196,36 +199,32 @@

    Examp
    # List output tables data list_data(xpdb_ex_pk)
    #> Data: #> problem simtab data modified -#> <int> <lgl> <list> <lgl> -#> 1 1 FALSE <tibble [550 × 31]> FALSE -#> 2 2 TRUE <tibble [11,000 × 12]> FALSE
    +#> <int> <lgl> <list> <lgl> +#> 1 1 FALSE <tibble [550 × 31]> FALSE +#> 2 2 TRUE <tibble [11,000 × 12]> FALSE
    # List output files data list_files(xpdb_ex_pk)
    #> Files: #> name extension problem subprob method data modified -#> <chr> <chr> <dbl> <dbl> <chr> <list> <lgl> -#> 1 run001.cor cor 1 0 foce <tibble [14 × 15]> FALSE -#> 2 run001.cov cov 1 0 foce <tibble [14 × 15]> FALSE -#> 3 run001.ext ext 1 0 foce <tibble [28 × 16]> FALSE -#> 4 run001.grd grd 1 0 foce <tibble [21 × 11]> FALSE -#> 5 run001.phi phi 1 0 foce <tibble [74 × 12]> FALSE -#> 6 run001.shk shk 1 0 foce <tibble [7 × 5]> FALSE
    +#> <chr> <chr> <dbl> <dbl> <chr> <list> <lgl> +#> 1 run001.cor cor 1 0 foce <tibble [14 × 15]> FALSE +#> 2 run001.cov cov 1 0 foce <tibble [14 × 15]> FALSE +#> 3 run001.ext ext 1 0 foce <tibble [28 × 16]> FALSE +#> 4 run001.grd grd 1 0 foce <tibble [21 × 11]> FALSE +#> 5 run001.phi phi 1 0 foce <tibble [74 × 12]> FALSE +#> 6 run001.shk shk 1 0 foce <tibble [7 × 5]> FALSE
    # List special data xpdb_ex_pk %>% vpc_data(quiet = TRUE) %>% list_special()
    #> Specials: #> problem method type data modified -#> <dbl> <chr> <chr> <list> <lgl> -#> 1 3 vpc continuous <named list [19]> FALSE
    +#> <dbl> <chr> <chr> <list> <lgl> +#> 1 3 vpc continuous <named list [19]> FALSE

    - @@ -236,7 +235,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/make_extension.html b/docs/reference/make_extension.html index dc85c2ab..0e7f1750 100644 --- a/docs/reference/make_extension.html +++ b/docs/reference/make_extension.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -191,13 +194,10 @@

    Value

    A string or vector of strings of extension(s).

    - @@ -208,7 +208,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/manual_nm_import.html b/docs/reference/manual_nm_import.html index 7e265cdc..68ff6ae5 100644 --- a/docs/reference/manual_nm_import.html +++ b/docs/reference/manual_nm_import.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -224,15 +227,10 @@

    Examp xpose_data(runno = '001', manual_import = manual_nm_import(tab_names = 'mytab')) }

    - @@ -243,7 +241,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/merge_firstonly.html b/docs/reference/merge_firstonly.html index 8c1ca2a8..92273710 100644 --- a/docs/reference/merge_firstonly.html +++ b/docs/reference/merge_firstonly.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -195,13 +198,10 @@

    Value

    A list containing `data` and `index` of the merged table.

    - @@ -212,7 +212,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/minimization_plots-1.png b/docs/reference/minimization_plots-1.png index 77553ee3..a34c4a79 100644 Binary files a/docs/reference/minimization_plots-1.png and b/docs/reference/minimization_plots-1.png differ diff --git a/docs/reference/minimization_plots-2.png b/docs/reference/minimization_plots-2.png index 69a30bab..f5f81a7d 100644 Binary files a/docs/reference/minimization_plots-2.png and b/docs/reference/minimization_plots-2.png differ diff --git a/docs/reference/minimization_plots.html b/docs/reference/minimization_plots.html index 20098426..e509f162 100644 --- a/docs/reference/minimization_plots.html +++ b/docs/reference/minimization_plots.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -343,17 +346,10 @@

    Examp grd_vs_iteration(xpdb_ex_pk)

    #> Parameters non-varying across ITERATION not shown.
    #> Using run001.grd $prob no.1, subprob no.0, method foce.
    #> Tidying data by ITERATION
    - @@ -364,7 +360,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/modify_xpdb-1.png b/docs/reference/modify_xpdb-1.png index 76051c9d..ec7c7e8b 100644 Binary files a/docs/reference/modify_xpdb-1.png and b/docs/reference/modify_xpdb-1.png differ diff --git a/docs/reference/modify_xpdb-2.png b/docs/reference/modify_xpdb-2.png index 4a8cb9c3..b375c36e 100644 Binary files a/docs/reference/modify_xpdb-2.png and b/docs/reference/modify_xpdb-2.png differ diff --git a/docs/reference/modify_xpdb.html b/docs/reference/modify_xpdb.html index 0cc99b93..ff0a08c5 100644 --- a/docs/reference/modify_xpdb.html +++ b/docs/reference/modify_xpdb.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -172,7 +175,7 @@

    Add, remove or rename variables in an xpdb

    mutate() adds new variables and preserves existing ones. -select() keeps only the listed variables; rename() keeps all variables.

    +select() keeps only the listed variables; rename() keeps all variables.

    # S3 method for xpose_data
    @@ -182,7 +185,7 @@ 

    Add, remove or rename variables in an xpdb

    select(.data, ..., .problem, .source, .where) # S3 method for xpose_data -rename(.data, ..., .problem, .source, .where)
    +rename(.data, ..., .problem, .source, .where)

    Arguments

    @@ -225,16 +228,13 @@

    Examp # Rename/select columns xpdb_ex_pk %>% select(ID:TAD, DV, EVID) %>% - rename(TSLD = TAD) %>% + rename(TSLD = TAD) %>% dv_vs_idv(aes(x = TSLD))
    #> Using data from $prob no.1
    #> Filtering data by EVID == 0
    #> `geom_smooth()` using formula 'y ~ x'
    #> `geom_smooth()` using formula 'y ~ x'
    - @@ -245,7 +245,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/msg.html b/docs/reference/msg.html index cbb90b12..4a60a127 100644 --- a/docs/reference/msg.html +++ b/docs/reference/msg.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -193,13 +196,10 @@

    Value

    Silent when quiet is `TRUE` or a message is quiet is `FALSE`.

    - @@ -210,7 +210,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/only_distinct.html b/docs/reference/only_distinct.html index 46343ada..7165e5cf 100644 --- a/docs/reference/only_distinct.html +++ b/docs/reference/only_distinct.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -202,13 +205,10 @@

    Value

    A function

    - @@ -219,7 +219,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/only_obs.html b/docs/reference/only_obs.html index e9cd3480..4868fd3d 100644 --- a/docs/reference/only_obs.html +++ b/docs/reference/only_obs.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -199,13 +202,10 @@

    Value

    A function

    - @@ -216,7 +216,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/parse_arg.html b/docs/reference/parse_arg.html index 10722358..1e5370a6 100644 --- a/docs/reference/parse_arg.html +++ b/docs/reference/parse_arg.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -196,13 +199,10 @@

    Value

    ggplot2 aesthetics for the layer defined in `name`.

    - @@ -213,7 +213,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/parse_nm_files.html b/docs/reference/parse_nm_files.html index a5fbee07..3ee23197 100644 --- a/docs/reference/parse_nm_files.html +++ b/docs/reference/parse_nm_files.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -197,13 +200,10 @@

    Value

    `subprob`, and `method`.

    - @@ -214,7 +214,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/parse_title.html b/docs/reference/parse_title.html index 78b0cb25..2c96d5c4 100644 --- a/docs/reference/parse_title.html +++ b/docs/reference/parse_title.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -222,13 +225,10 @@

    Value

    The parsed `string`.

    - @@ -239,7 +239,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/pred_vs_idv-1.png b/docs/reference/pred_vs_idv-1.png index 84f545b2..37e5fe94 100644 Binary files a/docs/reference/pred_vs_idv-1.png and b/docs/reference/pred_vs_idv-1.png differ diff --git a/docs/reference/pred_vs_idv-2.png b/docs/reference/pred_vs_idv-2.png index 831f578c..cecc879a 100644 Binary files a/docs/reference/pred_vs_idv-2.png and b/docs/reference/pred_vs_idv-2.png differ diff --git a/docs/reference/pred_vs_idv-3.png b/docs/reference/pred_vs_idv-3.png index f2b755bd..9560449e 100644 Binary files a/docs/reference/pred_vs_idv-3.png and b/docs/reference/pred_vs_idv-3.png differ diff --git a/docs/reference/pred_vs_idv-4.png b/docs/reference/pred_vs_idv-4.png index 4523a0c5..4d7baacd 100644 Binary files a/docs/reference/pred_vs_idv-4.png and b/docs/reference/pred_vs_idv-4.png differ diff --git a/docs/reference/pred_vs_idv.html b/docs/reference/pred_vs_idv.html index 8333a002..2fdcb389 100644 --- a/docs/reference/pred_vs_idv.html +++ b/docs/reference/pred_vs_idv.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -358,17 +361,10 @@

    Examp dv_preds_vs_idv(xpdb_ex_pk)

    #> Using data from $prob no.1
    #> Filtering data by EVID == 0
    #> Tidying data by ID, SEX, MED1, MED2, DOSE ... and 23 more variables
    #> `geom_smooth()` using formula 'y ~ x'
    #> `geom_smooth()` using formula 'y ~ x'
    - @@ -379,7 +375,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/print.xpose_data.html b/docs/reference/print.xpose_data.html index 50fa99ba..f2a4f21b 100644 --- a/docs/reference/print.xpose_data.html +++ b/docs/reference/print.xpose_data.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -196,34 +199,31 @@

    Examp
    # Using the print function print(xpdb_ex_pk)
    #> run001.lst overview: #> - Software: nonmem 7.3.0 -#> - Attached files (memory usage 1.3 Mb): +#> - Attached files (memory usage 1.4 Mb): #> + obs tabs: $prob no.1: catab001.csv, cotab001, patab001, sdtab001 #> + sim tabs: $prob no.2: simtab001.zip #> + output files: run001.cor, run001.cov, run001.ext, run001.grd, run001.phi, run001.shk #> + special: <none> #> - gg_theme: theme_readable #> - xp_theme: theme_xp_default -#> - Options: dir = analysis/models/pk/, quiet = FALSE, manual_import = NULL
    +#> - Options: dir = data, quiet = FALSE, manual_import = NULL
    # Or simply by writting the xpdb name xpdb_ex_pk
    #> run001.lst overview: #> - Software: nonmem 7.3.0 -#> - Attached files (memory usage 1.3 Mb): +#> - Attached files (memory usage 1.4 Mb): #> + obs tabs: $prob no.1: catab001.csv, cotab001, patab001, sdtab001 #> + sim tabs: $prob no.2: simtab001.zip #> + output files: run001.cor, run001.cov, run001.ext, run001.grd, run001.phi, run001.shk #> + special: <none> #> - gg_theme: theme_readable #> - xp_theme: theme_xp_default -#> - Options: dir = analysis/models/pk/, quiet = FALSE, manual_import = NULL
    +#> - Options: dir = data, quiet = FALSE, manual_import = NULL

    - @@ -234,7 +234,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/print.xpose_plot-1.png b/docs/reference/print.xpose_plot-1.png index 28a8f2ec..82392da1 100644 Binary files a/docs/reference/print.xpose_plot-1.png and b/docs/reference/print.xpose_plot-1.png differ diff --git a/docs/reference/print.xpose_plot-2.png b/docs/reference/print.xpose_plot-2.png index 28a8f2ec..82392da1 100644 Binary files a/docs/reference/print.xpose_plot-2.png and b/docs/reference/print.xpose_plot-2.png differ diff --git a/docs/reference/print.xpose_plot.html b/docs/reference/print.xpose_plot.html index 11e42410..e6d34920 100644 --- a/docs/reference/print.xpose_plot.html +++ b/docs/reference/print.xpose_plot.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -205,13 +208,10 @@

    Examp my_plot

    #> `geom_smooth()` using formula 'y ~ x'
    #> `geom_smooth()` using formula 'y ~ x'
    - @@ -222,7 +222,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/prm_table.html b/docs/reference/prm_table.html index 458aa4f8..0cf98994 100644 --- a/docs/reference/prm_table.html +++ b/docs/reference/prm_table.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -244,14 +247,10 @@

    Examp #> SIGMA(1,1) 1 fix -

    - @@ -262,7 +261,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/qq_plot-1.png b/docs/reference/qq_plot-1.png index e72df693..fd01084f 100644 Binary files a/docs/reference/qq_plot-1.png and b/docs/reference/qq_plot-1.png differ diff --git a/docs/reference/qq_plot-2.png b/docs/reference/qq_plot-2.png index bd4575ce..dd45c190 100644 Binary files a/docs/reference/qq_plot-2.png and b/docs/reference/qq_plot-2.png differ diff --git a/docs/reference/qq_plot-3.png b/docs/reference/qq_plot-3.png index 09521d77..c6fdc2be 100644 Binary files a/docs/reference/qq_plot-3.png and b/docs/reference/qq_plot-3.png differ diff --git a/docs/reference/qq_plot-4.png b/docs/reference/qq_plot-4.png index c1292648..832a1d5c 100644 Binary files a/docs/reference/qq_plot-4.png and b/docs/reference/qq_plot-4.png differ diff --git a/docs/reference/qq_plot.html b/docs/reference/qq_plot.html index 8d1f1365..ac238c19 100644 --- a/docs/reference/qq_plot.html +++ b/docs/reference/qq_plot.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -369,17 +372,10 @@

    Examp cov_qq(xpdb_ex_pk)

    #> Using data from $prob no.1
    #> Removing duplicated rows based on: ID
    #> Tidying data by ID, SEX, MED1, MED2, DOSE ... and 23 more variables
    - @@ -390,7 +386,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/raw_to_tibble.html b/docs/reference/raw_to_tibble.html index b33d4b3c..63c130b8 100644 --- a/docs/reference/raw_to_tibble.html +++ b/docs/reference/raw_to_tibble.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -197,13 +200,10 @@

    Value

    A tibble.

    - @@ -214,7 +214,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/read_args.html b/docs/reference/read_args.html index 07c52af7..f4986e12 100644 --- a/docs/reference/read_args.html +++ b/docs/reference/read_args.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -224,13 +227,10 @@

    Value

    of arguments to be used when calling fun).

    - @@ -241,7 +241,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/read_funs.html b/docs/reference/read_funs.html index 9d498943..493f5caf 100644 --- a/docs/reference/read_funs.html +++ b/docs/reference/read_funs.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -190,13 +193,10 @@

    Value

    A data import function.

    - @@ -207,7 +207,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/read_nm_files.html b/docs/reference/read_nm_files.html index 9010e6e1..b59737de 100644 --- a/docs/reference/read_nm_files.html +++ b/docs/reference/read_nm_files.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -241,15 +244,10 @@

    Examp ext_file <- read_nm_files(runno = '001', ext = '.ext', dir = 'models') }

    - @@ -260,7 +258,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/read_nm_model.html b/docs/reference/read_nm_model.html index ba2326cf..cb094998 100644 --- a/docs/reference/read_nm_model.html +++ b/docs/reference/read_nm_model.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -259,17 +262,10 @@

    Examp nm_model <- read_nm_model(runno = '001', ext = '.lst', dir = 'models') }

    - @@ -280,7 +276,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/read_nm_tables.html b/docs/reference/read_nm_tables.html index 96ff830d..9074d2b9 100644 --- a/docs/reference/read_nm_tables.html +++ b/docs/reference/read_nm_tables.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -261,14 +264,10 @@

    Examp }

    - @@ -279,7 +278,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/reexports.html b/docs/reference/reexports.html index 6a52c6c6..d58e691b 100644 --- a/docs/reference/reexports.html +++ b/docs/reference/reexports.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -56,7 +60,6 @@ " /> - @@ -74,7 +77,7 @@ - +
    @@ -181,8 +184,8 @@

    Objects exported from other packages

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    -
    dplyr

    distinct, filter, group_by, mutate, rename, select, slice, summarise, summarize, ungroup

    + +
    dplyr

    distinct, filter, group_by, mutate, rename, select, slice, summarise, summarize, ungroup

    ggforce

    facet_grid_paginate, facet_wrap_paginate

    @@ -195,11 +198,10 @@

    Objects exported from other packages

    - @@ -210,7 +212,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/reorder_factors.html b/docs/reference/reorder_factors.html index 840cc417..6208daef 100644 --- a/docs/reference/reorder_factors.html +++ b/docs/reference/reorder_factors.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -195,13 +198,10 @@

    Value

    A modified tibble

    - @@ -212,7 +212,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/res_vs_idv-1.png b/docs/reference/res_vs_idv-1.png index 6832a911..9bcb8166 100644 Binary files a/docs/reference/res_vs_idv-1.png and b/docs/reference/res_vs_idv-1.png differ diff --git a/docs/reference/res_vs_idv-2.png b/docs/reference/res_vs_idv-2.png index 44abbe0a..ba3ba7dd 100644 Binary files a/docs/reference/res_vs_idv-2.png and b/docs/reference/res_vs_idv-2.png differ diff --git a/docs/reference/res_vs_idv.html b/docs/reference/res_vs_idv.html index 41fcf046..1e666fc1 100644 --- a/docs/reference/res_vs_idv.html +++ b/docs/reference/res_vs_idv.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -55,7 +59,6 @@ " /> - @@ -73,7 +76,7 @@ - +
    @@ -333,16 +336,10 @@

    Examp absval_res_vs_idv(xpdb_ex_pk, res = 'CWRES')

    #> Using data from $prob no.1
    #> Filtering data by EVID == 0
    #> `geom_smooth()` using formula 'y ~ x'
    #> `geom_smooth()` using formula 'y ~ x'
    - @@ -353,7 +350,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/res_vs_pred-1.png b/docs/reference/res_vs_pred-1.png index 519bc014..9834583f 100644 Binary files a/docs/reference/res_vs_pred-1.png and b/docs/reference/res_vs_pred-1.png differ diff --git a/docs/reference/res_vs_pred-2.png b/docs/reference/res_vs_pred-2.png index 7f77cce0..30bcec55 100644 Binary files a/docs/reference/res_vs_pred-2.png and b/docs/reference/res_vs_pred-2.png differ diff --git a/docs/reference/res_vs_pred.html b/docs/reference/res_vs_pred.html index 6d479e12..e5068e00 100644 --- a/docs/reference/res_vs_pred.html +++ b/docs/reference/res_vs_pred.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -55,7 +59,6 @@ " /> - @@ -73,7 +76,7 @@ - +
    @@ -352,17 +355,10 @@

    Examp absval_res_vs_pred(xpdb_ex_pk, res = 'CWRES')

    #> Using data from $prob no.1
    #> Filtering data by EVID == 0
    #> `geom_smooth()` using formula 'y ~ x'
    #> `geom_smooth()` using formula 'y ~ x'
    - @@ -373,7 +369,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/set_vars.html b/docs/reference/set_vars.html index 8116a00e..7144a6ae 100644 --- a/docs/reference/set_vars.html +++ b/docs/reference/set_vars.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -247,16 +250,10 @@

    Examp # Change units xpdb_2 <- set_var_units(xpdb_2, .problem = 1, ALAG1 = 'h', CL = 'L/h', V = 'L')

    - @@ -267,7 +264,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/software.html b/docs/reference/software.html index 3561b1b8..99d29c89 100644 --- a/docs/reference/software.html +++ b/docs/reference/software.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -189,13 +192,10 @@

    Value

    The name of a modeling tool.

    - @@ -206,7 +206,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/subset_xpdb-1.png b/docs/reference/subset_xpdb-1.png index 26ef74e6..50f3ef09 100644 Binary files a/docs/reference/subset_xpdb-1.png and b/docs/reference/subset_xpdb-1.png differ diff --git a/docs/reference/subset_xpdb-2.png b/docs/reference/subset_xpdb-2.png index f13fba1c..699ebada 100644 Binary files a/docs/reference/subset_xpdb-2.png and b/docs/reference/subset_xpdb-2.png differ diff --git a/docs/reference/subset_xpdb-3.png b/docs/reference/subset_xpdb-3.png index e74ca39a..9980982e 100644 Binary files a/docs/reference/subset_xpdb-3.png and b/docs/reference/subset_xpdb-3.png differ diff --git a/docs/reference/subset_xpdb.html b/docs/reference/subset_xpdb.html index 63a260e2..f5c6680d 100644 --- a/docs/reference/subset_xpdb.html +++ b/docs/reference/subset_xpdb.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -49,7 +53,6 @@ Unlike base subsetting, rows where the condition evaluates to NA are dropped. Use slice() to select row/cases by their position" /> - @@ -67,7 +70,7 @@ - +
    @@ -231,13 +234,10 @@

    Examp distinct(TIME, .problem = 1) %>% dv_vs_ipred()

    #> Using data from $prob no.1
    #> Filtering data by EVID == 0
    #> `geom_smooth()` using formula 'y ~ x'
    #> `geom_smooth()` using formula 'y ~ x'
    - @@ -248,7 +248,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/summarise_xpdb.html b/docs/reference/summarise_xpdb.html index 0c6a16b9..93e56feb 100644 --- a/docs/reference/summarise_xpdb.html +++ b/docs/reference/summarise_xpdb.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -49,7 +53,6 @@ grouped table where operations are performed "by group". ungroup() removes grouping. summarize() reduces multiple values down to a single value." /> - @@ -67,7 +70,7 @@ - +
    @@ -233,13 +236,10 @@

    Examp xplot_distrib(aes(x = CMAX, density_fill = SEX), type = 'dr')

    #> Using data from $prob no.1
    - @@ -250,7 +250,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/summary.xpose_data.html b/docs/reference/summary.xpose_data.html index c0152c49..5d8fa2c4 100644 --- a/docs/reference/summary.xpose_data.html +++ b/docs/reference/summary.xpose_data.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -201,7 +204,7 @@

    Examp #> Summary for problem no. 0 [Global information] #> - Software @software : nonmem #> - Software version @version : 7.3.0 -#> - Run directory @dir : analysis/models/pk/ +#> - Run directory @dir : data #> - Run file @file : run001.lst #> - Run number @run : run001 #> - Reference model @ref : 000 @@ -236,13 +239,10 @@

    Examp #> (WARNING 22) WITH $MSFI AND "SUBPROBS", "TRUE=FINAL" ...

    - @@ -253,7 +253,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/template_titles-2.png b/docs/reference/template_titles-2.png index 4e30e97e..34d640b7 100644 Binary files a/docs/reference/template_titles-2.png and b/docs/reference/template_titles-2.png differ diff --git a/docs/reference/template_titles.html b/docs/reference/template_titles.html index dba852bc..27226e49 100644 --- a/docs/reference/template_titles.html +++ b/docs/reference/template_titles.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -98,7 +102,6 @@ " /> - @@ -116,7 +119,7 @@ - +
    @@ -228,7 +231,7 @@

    Template titles

    with a @ (e.g. @ofv) which will be replaced by their actual value when rendering the plot. For example '@run, @nobs observations in @nind subjects' would become 'run001, 1022 observations in 74 subjects'

    -

    Many key variables are available:

    +

    Many key variables are available:

    @condn

    Condition number

    @covtime

    Covariance matrix runtime

    @data

    Model input data used

    @@ -296,13 +299,10 @@

    Examp subtitle = NULL)

    #> Using data from $prob no.1
    #> Filtering data by EVID == 0
    #> `geom_smooth()` using formula 'y ~ x'
    #> `geom_smooth()` using formula 'y ~ x'
    - @@ -313,7 +313,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/tidyr_new_interface.html b/docs/reference/tidyr_new_interface.html index 70d49a33..8138d4b2 100644 --- a/docs/reference/tidyr_new_interface.html +++ b/docs/reference/tidyr_new_interface.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -181,12 +184,10 @@

    Value

    the package version of tidyr

    - @@ -197,7 +198,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/transform_prm.html b/docs/reference/transform_prm.html index f163802a..584a565b 100644 --- a/docs/reference/transform_prm.html +++ b/docs/reference/transform_prm.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -217,14 +220,10 @@

    Examp #>

    - @@ -235,7 +234,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/update_args.html b/docs/reference/update_args.html index 68343abb..903438b8 100644 --- a/docs/reference/update_args.html +++ b/docs/reference/update_args.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -198,13 +201,10 @@

    Value

    A list of arguments for the layer defined in `name`.

    - @@ -215,7 +215,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/update_extension.html b/docs/reference/update_extension.html index dcd97a84..6d6fad32 100644 --- a/docs/reference/update_extension.html +++ b/docs/reference/update_extension.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -193,13 +196,10 @@

    Value

    A string or vector of strings of file name(s).

    - @@ -210,7 +210,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/update_themes-1.png b/docs/reference/update_themes-1.png index 353cb313..e7810e1a 100644 Binary files a/docs/reference/update_themes-1.png and b/docs/reference/update_themes-1.png differ diff --git a/docs/reference/update_themes-2.png b/docs/reference/update_themes-2.png index dfa2ec6f..232eea82 100644 Binary files a/docs/reference/update_themes-2.png and b/docs/reference/update_themes-2.png differ diff --git a/docs/reference/update_themes.html b/docs/reference/update_themes.html index a752467c..b24f73c8 100644 --- a/docs/reference/update_themes.html +++ b/docs/reference/update_themes.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -49,7 +53,6 @@ xpdb object. All plots generated with this xpdb will automatically use the defined xpose (xp_theme) and ggplot2 (gg_theme) themes." /> - @@ -67,7 +70,7 @@ - +
    @@ -218,13 +221,10 @@

    Examp dv_vs_ipred(facets = 'SEX')

    #> Using data from $prob no.1
    #> Filtering data by EVID == 0
    #> `geom_smooth()` using formula 'y ~ x'
    #> `geom_smooth()` using formula 'y ~ x'
    - @@ -235,7 +235,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/vpc-1.png b/docs/reference/vpc-1.png index 1a11568e..b8f716b2 100644 Binary files a/docs/reference/vpc-1.png and b/docs/reference/vpc-1.png differ diff --git a/docs/reference/vpc.html b/docs/reference/vpc.html index 988f048d..bf6115ae 100644 --- a/docs/reference/vpc.html +++ b/docs/reference/vpc.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -342,17 +345,10 @@

    Examp #> 2. Computing VPC data

    #> Configuring and initializing...
    #> Parsing observed data...
    #> Filtering rows where EVID not 0
    #> Parsing simulated data...
    #> Filtering rows where EVID not 0
    #> Binning: 0 0.66667 1.25 1.8 3 5 7 9
    #> Calculating statistics for simulated data...
    #> Calculating statistics for observed data...
    #> #> VPC done
    - @@ -363,7 +359,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/vpc_data.html b/docs/reference/vpc_data.html index 1fe4805c..b32ed8f8 100644 --- a/docs/reference/vpc_data.html +++ b/docs/reference/vpc_data.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -247,14 +250,10 @@

    Examp vpc() }

    - @@ -265,7 +264,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/vpc_opt.html b/docs/reference/vpc_opt.html index f894bfdd..e175c44c 100644 --- a/docs/reference/vpc_opt.html +++ b/docs/reference/vpc_opt.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -319,14 +322,10 @@

    Examp #>

    - @@ -337,7 +336,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xp_geoms.html b/docs/reference/xp_geoms.html index 7f5e8e1c..147447cc 100644 --- a/docs/reference/xp_geoms.html +++ b/docs/reference/xp_geoms.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -207,13 +210,10 @@

    Value

    Output of the `ggfun` call.

    - @@ -224,7 +224,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xp_map.html b/docs/reference/xp_map.html index e48cb605..c05b9a10 100644 --- a/docs/reference/xp_map.html +++ b/docs/reference/xp_map.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -199,13 +202,10 @@

    Value

    Output of the `ggfun` call.

    - @@ -216,7 +216,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xp_themes-1.png b/docs/reference/xp_themes-1.png index 353cb313..e7810e1a 100644 Binary files a/docs/reference/xp_themes-1.png and b/docs/reference/xp_themes-1.png differ diff --git a/docs/reference/xp_themes-2.png b/docs/reference/xp_themes-2.png index 927c51cc..042970ff 100644 Binary files a/docs/reference/xp_themes-2.png and b/docs/reference/xp_themes-2.png differ diff --git a/docs/reference/xp_themes.html b/docs/reference/xp_themes.html index 19047374..191c9aa6 100644 --- a/docs/reference/xp_themes.html +++ b/docs/reference/xp_themes.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -54,7 +58,6 @@ " /> - @@ -72,7 +75,7 @@ - +
    @@ -202,12 +205,10 @@

    Examp dv_vs_ipred(facets = 'SEX')

    #> Using data from $prob no.1
    #> Filtering data by EVID == 0
    #> `geom_smooth()` using formula 'y ~ x'
    #> `geom_smooth()` using formula 'y ~ x'
    - @@ -218,7 +219,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xp_var.html b/docs/reference/xp_var.html index fe38f17c..a6d872f3 100644 --- a/docs/reference/xp_var.html +++ b/docs/reference/xp_var.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -208,13 +211,10 @@

    Value

    (units associated with the column)

    - @@ -225,7 +225,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xpdb_ex_pk.html b/docs/reference/xpdb_ex_pk.html index 2c7bc72a..841d133f 100644 --- a/docs/reference/xpdb_ex_pk.html +++ b/docs/reference/xpdb_ex_pk.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -188,24 +191,20 @@

    SourceExamples

    print(xpdb_ex_pk)
    #> run001.lst overview: #> - Software: nonmem 7.3.0 -#> - Attached files (memory usage 1.3 Mb): +#> - Attached files (memory usage 1.4 Mb): #> + obs tabs: $prob no.1: catab001.csv, cotab001, patab001, sdtab001 #> + sim tabs: $prob no.2: simtab001.zip #> + output files: run001.cor, run001.cov, run001.ext, run001.grd, run001.phi, run001.shk #> + special: <none> #> - gg_theme: theme_readable #> - xp_theme: theme_xp_default -#> - Options: dir = analysis/models/pk/, quiet = FALSE, manual_import = NULL
    +#> - Options: dir = data, quiet = FALSE, manual_import = NULL
    - @@ -216,7 +215,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xpdb_index_update.html b/docs/reference/xpdb_index_update.html index def25e3a..595d18f1 100644 --- a/docs/reference/xpdb_index_update.html +++ b/docs/reference/xpdb_index_update.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -190,12 +193,10 @@

    Arg

    - @@ -206,7 +207,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xplot_distrib.html b/docs/reference/xplot_distrib.html index 4f056e54..c4f9e5be 100644 --- a/docs/reference/xplot_distrib.html +++ b/docs/reference/xplot_distrib.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -324,17 +327,10 @@

    Examp xplot_distrib(xpdb_ex_pk, aes(x = CWRES), type = 'dr')

    #> Using data from $prob no.1
    - @@ -345,7 +341,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xplot_qq.html b/docs/reference/xplot_qq.html index a5bb23e3..920044df 100644 --- a/docs/reference/xplot_qq.html +++ b/docs/reference/xplot_qq.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -319,17 +322,10 @@

    Examp
    xplot_qq(xpdb_ex_pk, aes(sample = CWRES), guide = TRUE)
    #> Using data from $prob no.1

    - @@ -340,7 +336,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xplot_scatter.html b/docs/reference/xplot_scatter.html index e08b6eaa..d898055a 100644 --- a/docs/reference/xplot_scatter.html +++ b/docs/reference/xplot_scatter.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -328,17 +331,10 @@

    Examp
    xplot_scatter(xpdb_ex_pk, aes(x = IPRED, y = DV))
    #> Using data from $prob no.1
    #> `geom_smooth()` using formula 'y ~ x'
    #> `geom_smooth()` using formula 'y ~ x'

    - @@ -349,7 +345,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xpose-package.html b/docs/reference/xpose-package.html index 5f8abd12..ba39aa03 100644 --- a/docs/reference/xpose-package.html +++ b/docs/reference/xpose-package.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -49,7 +53,6 @@ processing burden and improve diagnostics commonly associated the development of non-linear mixed effect models. To learn more about xpose, visit our website: https://UUPharmacometrics.github.io/xpose/." /> - @@ -67,7 +70,7 @@ - +
    @@ -189,25 +192,10 @@

    See a

    - @@ -218,7 +206,7 @@

    Author

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xpose_data.html b/docs/reference/xpose_data.html index 2c1a949f..8fb55881 100644 --- a/docs/reference/xpose_data.html +++ b/docs/reference/xpose_data.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -305,15 +308,10 @@

    Examp }

    - @@ -324,7 +322,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xpose_panels.html b/docs/reference/xpose_panels.html index cc88cfcb..3d92cf21 100644 --- a/docs/reference/xpose_panels.html +++ b/docs/reference/xpose_panels.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -47,7 +51,6 @@ - @@ -65,7 +68,7 @@ - +
    @@ -195,13 +198,10 @@

    Value

    `facets` is a string, and `facet_grid_paginate` if `facets` is a formula.

    - @@ -212,7 +212,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/xpose_save.html b/docs/reference/xpose_save.html index f29b14a7..6d0ddffb 100644 --- a/docs/reference/xpose_save.html +++ b/docs/reference/xpose_save.html @@ -17,23 +17,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -48,7 +52,6 @@ - @@ -66,7 +69,7 @@ - +
    @@ -238,13 +241,10 @@

    Examp xpose_save(file = file.path(tempdir(), "dv_vs_ipred_example.pdf")) }

    - @@ -255,7 +255,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/tests/testthat/data/ctrl_psn_vpc.RData b/tests/testthat/data/ctrl_psn_vpc.RData index 60aef7ab..2f7ca2d3 100755 Binary files a/tests/testthat/data/ctrl_psn_vpc.RData and b/tests/testthat/data/ctrl_psn_vpc.RData differ diff --git a/tests/testthat/data/ctrl_special.RData b/tests/testthat/data/ctrl_special.RData index 16f72500..ef478109 100755 Binary files a/tests/testthat/data/ctrl_special.RData and b/tests/testthat/data/ctrl_special.RData differ diff --git a/tests/testthat/test-console_outputs.R b/tests/testthat/test-console_outputs.R index 9f5e540e..96b55210 100755 --- a/tests/testthat/test-console_outputs.R +++ b/tests/testthat/test-console_outputs.R @@ -10,11 +10,11 @@ xpdb_modified <- xpdb_ex_pk %>% mem_use_1 <- format(utils::object.size(xpdb_ex_pk), units = 'auto') mem_use_2 <- format(utils::object.size(xpdb_modified), units = 'auto') -print_text <- paste0('run001.lst overview: \n - Software: nonmem 7.3.0 \n - Attached files (memory usage ', mem_use_1, '): \n + obs tabs: $prob no.1: catab001.csv, cotab001, patab001, sdtab001 \n + sim tabs: $prob no.2: simtab001.zip \n + output files: run001.cor, run001.cov, run001.ext, run001.grd, run001.phi, run001.shk \n + special: \n - gg_theme: theme_readable \n - xp_theme: theme_xp_default \n - Options: dir = analysis/models/pk/, quiet = FALSE, manual_import = NULL') -print_text_modified <- paste0('run001.lst overview: \n - Software: nonmem 7.3.0 \n - Attached files (memory usage ', mem_use_2, '): \n + obs tabs: $prob no.1 (modified): catab001.csv, cotab001, patab001, sdtab001 \n + sim tabs: $prob no.2 (modified): simtab001.zip \n + output files: run001.cor, run001.cov, run001.ext (modified), run001.grd, run001.phi, run001.shk \n + special: vpc continuous (#3, modified) \n - gg_theme: theme_readable \n - xp_theme: theme_xp_default \n - Options: dir = analysis/models/pk/, quiet = FALSE, manual_import = NULL') +print_text <- paste0('run001.lst overview: \n - Software: nonmem 7.3.0 \n - Attached files (memory usage ', mem_use_1, '): \n + obs tabs: $prob no.1: catab001.csv, cotab001, patab001, sdtab001 \n + sim tabs: $prob no.2: simtab001.zip \n + output files: run001.cor, run001.cov, run001.ext, run001.grd, run001.phi, run001.shk \n + special: \n - gg_theme: theme_readable \n - xp_theme: theme_xp_default \n - Options: dir = data, quiet = FALSE, manual_import = NULL') +print_text_modified <- paste0('run001.lst overview: \n - Software: nonmem 7.3.0 \n - Attached files (memory usage ', mem_use_2, '): \n + obs tabs: $prob no.1 (modified): catab001.csv, cotab001, patab001, sdtab001 \n + sim tabs: $prob no.2 (modified): simtab001.zip \n + output files: run001.cor, run001.cov, run001.ext (modified), run001.grd, run001.phi, run001.shk \n + special: vpc continuous (#3, modified) \n - gg_theme: theme_readable \n - xp_theme: theme_xp_default \n - Options: dir = data, quiet = FALSE, manual_import = NULL') prm_text_1 <- '\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\nEstimates for $prob no.1, subprob no.0, method foce\n Parameter Label Value RSE\n THETA1 TVCL 26.29 0.03391\n THETA2 TVV 1.348 0.0325\n THETA3 TVKA 4.204 0.1925\n THETA4 LAG 0.208 0.07554\n THETA5 Prop. Err 0.2046 0.1097\n THETA6 Add. Err 0.01055 0.3466\n THETA7 CRCL on CL 0.007172 0.2366\n OMEGA(1,1) IIV CL 0.2701 0.08616\n OMEGA(2,2) IIV V 0.195 0.1643\n OMEGA(3,3) IIV KA 1.381 0.1463\n SIGMA(1,1) 1 fix - ' prm_text_2 <- '\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\nEstimates for $prob no.1, subprob no.0, method foce\n Parameter Label Value SE\n THETA1 TVCL 26.29 0.8915\n THETA2 TVV 1.348 0.04381\n THETA3 TVKA 4.204 0.8091\n THETA4 LAG 0.208 0.01571\n THETA5 Prop. Err 0.2046 0.02244\n THETA6 Add. Err 0.01055 0.003658\n THETA7 CRCL on CL 0.007172 0.001697\n OMEGA(1,1) IIV CL 0.07295 0.01257\n OMEGA(2,2) IIV V 0.03802 0.0125\n OMEGA(3,3) IIV KA 1.907 0.5582\n SIGMA(1,1) 1 fix - ' -summary_text <- '\nSummary for problem no. 0 [Global information] \n - Software @software : nonmem\n - Software version @version : 7.3.0\n - Run directory @dir : analysis/models/pk/\n - Run file @file : run001.lst\n - Run number @run : run001\n - Reference model @ref : 000\n - Run description @descr : NONMEM PK example for xpose\n - Run start time @timestart : Mon Oct 16 13:34:28 CEST 2017\n - Run stop time @timestop : Mon Oct 16 13:34:35 CEST 2017\n\nSummary for problem no. 1 [Parameter estimation] \n - Input data @data : ../../mx19_2.csv\n - Number of individuals @nind : 74\n - Number of observations @nobs : 476\n - ADVAN @subroutine : 2\n - Estimation method @method : foce-i\n - Termination message @term : MINIMIZATION SUCCESSFUL\n - Estimation runtime @runtime : 00:00:02\n - Objective function value @ofv : -1403.905\n - Number of significant digits @nsig : 3.3\n - Covariance step runtime @covtime : 00:00:03\n - Condition number @condn : 21.5\n - Eta shrinkage @etashk : 9.3 [1], 28.7 [2], 23.7 [3]\n - Epsilon shrinkage @epsshk : 14.9 [1]\n - Run warnings @warnings : (WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION.\n\nSummary for problem no. 2 [Model simulations] \n - Input data @data : ../../mx19_2.csv\n - Number of individuals @nind : 74\n - Number of observations @nobs : 476\n - Estimation method @method : sim\n - Number of simulations @nsim : 20\n - Simulation seed @simseed : 221287\n - Run warnings @warnings : (WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION.\n (WARNING 22) WITH $MSFI AND \"SUBPROBS\", \"TRUE=FINAL\" ...' +summary_text <- '\nSummary for problem no. 0 [Global information] \n - Software @software : nonmem\n - Software version @version : 7.3.0\n - Run directory @dir : data\n - Run file @file : run001.lst\n - Run number @run : run001\n - Reference model @ref : 000\n - Run description @descr : NONMEM PK example for xpose\n - Run start time @timestart : Mon Oct 16 13:34:28 CEST 2017\n - Run stop time @timestop : Mon Oct 16 13:34:35 CEST 2017\n\nSummary for problem no. 1 [Parameter estimation] \n - Input data @data : ../../mx19_2.csv\n - Number of individuals @nind : 74\n - Number of observations @nobs : 476\n - ADVAN @subroutine : 2\n - Estimation method @method : foce-i\n - Termination message @term : MINIMIZATION SUCCESSFUL\n - Estimation runtime @runtime : 00:00:02\n - Objective function value @ofv : -1403.905\n - Number of significant digits @nsig : 3.3\n - Covariance step runtime @covtime : 00:00:03\n - Condition number @condn : 21.5\n - Eta shrinkage @etashk : 9.3 [1], 28.7 [2], 23.7 [3]\n - Epsilon shrinkage @epsshk : 14.9 [1]\n - Run warnings @warnings : (WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION.\n\nSummary for problem no. 2 [Model simulations] \n - Input data @data : ../../mx19_2.csv\n - Number of individuals @nind : 74\n - Number of observations @nobs : 476\n - Estimation method @method : sim\n - Number of simulations @nsim : 20\n - Simulation seed @simseed : 221287\n - Run warnings @warnings : (WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION.\n (WARNING 22) WITH $MSFI AND \"SUBPROBS\", \"TRUE=FINAL\" ...' vars_text <- '\nList of available variables for problem no. 1 \n - Subject identifier (id) : ID\n - Dependent variable (dv) : DV\n - Independent variable (idv) : TIME\n - Dose amount (amt) : AMT\n - Event identifier (evid) : EVID\n - Model typical predictions (pred) : PRED\n - Model individual predictions (ipred) : IPRED\n - Model parameter (param) : KA, CL, V, ALAG1\n - Eta (eta) : ETA1, ETA2, ETA3\n - Residuals (res) : CWRES, IWRES, RES, WRES\n - Categorical covariates (catcov) : SEX, MED1, MED2\n - Continuous covariates (contcov) : CLCR, AGE, WT\n - Compartment amounts (a) : A1, A2\n - Not attributed (na) : DOSE, SS, II, TAD, CPRED' # Tests start here -------------------------------------------------------- diff --git a/tests/testthat/test-edits.R b/tests/testthat/test-edits.R index 7fcbc4cc..0af46f74 100755 --- a/tests/testthat/test-edits.R +++ b/tests/testthat/test-edits.R @@ -12,7 +12,8 @@ ctrl_tab_2 <- xpdb_ex_pk %>% group_by(ID, SEX, .problem = 1) %>% summarize(CMAX = max(DV), .problem = 1) %>% ungroup(.problem = 1) %>% - get_data(.problem = 1) + get_data(.problem = 1) %>% + ungroup() test_xpdb_1 <- vpc_data(xpdb_ex_pk, opt = vpc_opt(n_bins = 2), quiet = TRUE) ctrl_xpdb_1 <- test_xpdb_1 @@ -32,14 +33,15 @@ test_that('xpdb_edits checks error properly', { }) test_that('xpdb_edits works properly', { - expect_equal(filter.xpose_data(.data = xpdb_ex_pk, ID == 110, TIME > 10, .problem = 1) %>% get_data(.problem = 1), + expect_equal(filter.xpose_data(.data = xpdb_ex_pk, ID == 110, TIME > 10, .problem = 1) %>% + get_data(.problem = 1), xpdb_ex_pk %>% get_data(.problem = 1) %>% filter(.$ID == 110, .$TIME > 10)) expect_equal(filter.xpose_data(.data = xpdb_ex_pk, ID == 110, .problem = 1, .source = 'phi') %>% slice.xpose_data(1:3, .source = 'phi') %>% mutate.xpose_data(TEST = 'Ok', .source = 'phi') %>% get_file(ext = 'phi', quiet = TRUE), - xpdb_ex_pk %>% get_file(ext = 'phi', quiet = TRUE) %>% filter(.$ID == 110) - %>% slice(1:3) %>% mutate(TEST = 'Ok')) + xpdb_ex_pk %>% get_file(ext = 'phi', quiet = TRUE) %>% filter(.$ID == 110) %>% + slice(1:3) %>% mutate(TEST = 'Ok')) expect_equal(ctrl_tab_1, xpdb_ex_pk %>% get_data(.problem = 1) %>% mutate(DV = log(DV)) %>% @@ -81,3 +83,4 @@ test_that('n() works', { expect_equal(xpdb_ex_pk %>% mutate(N = 1:n(), .source = 'ext') %>% get_file(ext = 'ext', quiet = TRUE), xpdb_ex_pk %>% get_file(ext = 'ext', quiet = TRUE) %>% mutate(N = 1:n())) }) + diff --git a/tests/testthat/test-fetch_data.R b/tests/testthat/test-fetch_data.R index 2ef13780..dedd196f 100755 --- a/tests/testthat/test-fetch_data.R +++ b/tests/testthat/test-fetch_data.R @@ -34,9 +34,9 @@ test_that('fetch_data can get simple data', { expect_equal(attr(imported_data, 'problem'), 1) expect_equal(attr(imported_data, 'simtab'), FALSE) expect_equal(attr(imported_data, 'source'), 'data') - + # Check output - expect_equal(imported_data, xpdb_ex_pk$data$data[[1]][xpdb_ex_pk$data$data[[1]]$EVID == 0, ]) + expect_equivalent(imported_data, xpdb_ex_pk$data$data[[1]][xpdb_ex_pk$data$data[[1]]$EVID == 0, ]) }) test_that('fetch_data can tidy data', { @@ -46,7 +46,7 @@ test_that('fetch_data can tidy data', { tidy = TRUE, value_col = c('IPRED','PRED', 'DV')) # Check output - expect_equal(imported_tidy_data, + expect_equivalent(imported_tidy_data, xpdb_ex_pk$data$data[[1]][xpdb_ex_pk$data$data[[1]]$EVID == 0, c('ID', 'TIME', 'IPRED', 'PRED', 'DV')] %>% tidyr::gather(value = 'value', key = 'variable', @@ -55,6 +55,7 @@ test_that('fetch_data can tidy data', { }) test_that('fetch_data can get file data', { - expect_equal(fetch_data(xpdb_ex_pk, .problem = 1, .source = 'ext', quiet = TRUE), - xpdb_ex_pk$files[xpdb_ex_pk$files$name == 'run001.ext',]$data[[1]]) + fetched_data <- fetch_data(xpdb_ex_pk, .problem = 1, .source = 'ext', quiet = TRUE) + + expect_equivalent(fetched_data, xpdb_ex_pk$files[xpdb_ex_pk$files$name == 'run001.ext',]$data[[1]]) }) diff --git a/tests/testthat/test-manual_import.R b/tests/testthat/test-manual_import.R index c4517d96..43141989 100755 --- a/tests/testthat/test-manual_import.R +++ b/tests/testthat/test-manual_import.R @@ -27,3 +27,4 @@ test_that('list_nm_tables_manual function works properly', { test <- dplyr::arrange_at(.tbl = test, .vars = 'table') expect_identical(test, ctrl_data) }) + diff --git a/tests/testthat/test-read_nm_model.R b/tests/testthat/test-read_nm_model.R index 2b60df7e..5036b230 100755 --- a/tests/testthat/test-read_nm_model.R +++ b/tests/testthat/test-read_nm_model.R @@ -28,9 +28,14 @@ test_that('properly parses a model given via the runno and dir arguments', { test_that('properly handles missing code in output file', { expect_warning(recover_model <- read_nm_model(runno = '002', ext = '.lst', dir = 'data'), regexp = 'No model code found in `.lst` NONMEM output file importing `.mod` instead.') + + # Fix file attribute to be comparable + attr(recover_model, "file") <- "run001.lst" + expect_equal(recover_model, ctrl_mod[-c(1, which(ctrl_mod$level > 30)), ]) }) test_that('problem record is present even if no text has been supplied',{ expect_true('pro' %in% read_nm_model(file = 'sim.lst', dir = 'data')[['subroutine']]) }) + diff --git a/tests/testthat/test-read_nm_tables.R b/tests/testthat/test-read_nm_tables.R index 45a6f04e..108c7cbf 100755 --- a/tests/testthat/test-read_nm_tables.R +++ b/tests/testthat/test-read_nm_tables.R @@ -17,7 +17,7 @@ ctrl_file <- get_data(xpdb_ex_pk, table = 'patab001') %>% firstonly_test <- as.nm.table.list(dplyr::tibble(problem = 1, file = file_path('data', c('sdtab001', 'patab001')), - firstonly = c(TRUE, FALSE), + firstonly = c(FALSE, TRUE), simtab = FALSE)) minus_sign_test <- c('TABLE NO. 1', @@ -73,7 +73,7 @@ test_that('tables with firstonly are properly handled', { skip_on_cran() # Skip to avoid issue with no long double expect_equal(tmp_table$data[[1]], - xpdb_ex_pk$data$data[[1]][, unlist(xpdb_ex_pk$data$index[[1]][xpdb_ex_pk$data$index[[1]]$table %in% c('sdtab001', 'patab001'),]$col) ]) + xpdb_ex_pk$data$data[[1]][, unique(unlist(xpdb_ex_pk$data$index[[1]][xpdb_ex_pk$data$index[[1]]$table %in% c('sdtab001', 'patab001'),]$col)) ]) }) test_that('properly assign skip and header arguments', { diff --git a/tests/testthat/test-vpc.R b/tests/testthat/test-vpc.R index fa323035..a92de76f 100755 --- a/tests/testthat/test-vpc.R +++ b/tests/testthat/test-vpc.R @@ -10,15 +10,10 @@ load(file = 'data/ctrl_special.RData') # ctrl_psn_vpc_dat <- psn_vpc_parser(xpdb = xpdb_ex_pk, psn_folder = 'data/psn_vpc/', # psn_bins = TRUE, opt = vpc_opt(), quiet = TRUE) -# save(ctrl_psn_vpc_dat, file = 'data/ctrl_psn_vpc.RData', +# save(ctrl_psn_vpc_dat, file = 'data/ctrl_psn_vpc.RData', # compress = 'xz', version = 2) load(file = 'data/ctrl_psn_vpc.RData') - -xpdb_vpc_test <- xpdb_ex_pk %>% - vpc_data(opt = vpc_opt(n_bins = 3, lloq = 0.1), quiet = TRUE) %>% - vpc_data(vpc_type = 'cens', opt = vpc_opt(n_bins = 3, lloq = 0.4), quiet = TRUE) - test_psn_vpc <- vpc_data(xpdb_ex_pk, psn_folder = 'data/psn_vpc/', quiet = TRUE) # Tests start here -------------------------------------------------------- @@ -40,6 +35,14 @@ test_that('vpc_data properly check input', { }) test_that('vpc_data works properly with xpdb tables', { + + skip_if(condition = utils::packageVersion("dplyr") > "0.8.5" & utils::packageVersion("vpc") < "1.2.1", + message = "Incompatible package versions...") + + xpdb_vpc_test <- xpdb_ex_pk %>% + vpc_data(opt = vpc_opt(n_bins = 3, lloq = 0.1), quiet = TRUE) %>% + vpc_data(vpc_type = 'cens', opt = vpc_opt(n_bins = 3, lloq = 0.4), quiet = TRUE) + expect_true(is.xpdb(xpdb_vpc_test)) expect_identical(xpdb_vpc_test$special, ctrl_special$special) }) @@ -69,6 +72,10 @@ test_that('vpc plot properly check input', { }) test_that('vpc plot are properly generated', { + + skip_if(condition = utils::packageVersion("dplyr") > "0.8.5" & utils::packageVersion("vpc") < "1.2.1", + message = "Incompatible package versions...") + p_cont <- vpc(ctrl_special, vpc_type = 'continuous', type = 'alrpt', quiet = FALSE) p_cont2 <- vpc(ctrl_special, vpc_type = 'continuous', facets = ~group) p_cens <- vpc(ctrl_special, vpc_type = 'censored', smooth = FALSE, facets = 'group', @@ -90,5 +97,5 @@ test_that('vpc plot are properly generated', { expect_equal(p_cont$xpose$problem, 3) expect_equal(p_cens$xpose$problem, 4) expect_equal(p_cont$xpose$summary$value[p_cont$xpose$summary$label %in% c('vpcdir', 'vpcnsim', 'vpcci', 'vpcpi')], - c('analysis/models/pk/', '20', '95', '95')) + c('data', '20', '95', '95')) }) diff --git a/tests/testthat/test-xpdb_access.R b/tests/testthat/test-xpdb_access.R index 6e675f96..e7371263 100755 --- a/tests/testthat/test-xpdb_access.R +++ b/tests/testthat/test-xpdb_access.R @@ -1,10 +1,5 @@ context('Check xpdb_access functions') -# Define files to be tested ----------------------------------------------- -xpdb_vpc <- xpdb_ex_pk %>% - vpc_data(quiet = TRUE) %>% - vpc_data(vpc_type = 'censored', opt = vpc_opt(lloq = 0.4), quiet = TRUE) - # Tests for get_code ------------------------------------------------------ test_that('get_code checks input properly', { @@ -191,6 +186,14 @@ test_that('get_prm works properly', { # Tests for get_special --------------------------------------------------- test_that('get_special checks input properly', { + + skip_if(condition = utils::packageVersion("dplyr") > "0.8.5" & utils::packageVersion("vpc") < "1.2.1", + message = "Incompatible package versions...") + + xpdb_vpc <- xpdb_ex_pk %>% + vpc_data(quiet = TRUE) %>% + vpc_data(vpc_type = 'censored', opt = vpc_opt(lloq = 0.4), quiet = TRUE) + # Error with missing xpdb expect_error(get_special(), regexp = '"xpdb" is missing') @@ -199,6 +202,14 @@ test_that('get_special checks input properly', { }) test_that('get_data works properly', { + + skip_if(condition = utils::packageVersion("dplyr") > "0.8.5" & utils::packageVersion("vpc") < "1.2.1", + message = "Incompatible package versions...") + + xpdb_vpc <- xpdb_ex_pk %>% + vpc_data(quiet = TRUE) %>% + vpc_data(vpc_type = 'censored', opt = vpc_opt(lloq = 0.4), quiet = TRUE) + # Default return works properly expect_message(tmp_get_special_1 <- get_special(xpdb_vpc), regexp = 'Returning vpc censored data from \\$prob no\\.4') expect_equal(tmp_get_special_1, xpdb_vpc$special$data[[2]]) diff --git a/tests/testthat/test-xpose_data.R b/tests/testthat/test-xpose_data.R index e95ef8e2..86786c48 100755 --- a/tests/testthat/test-xpose_data.R +++ b/tests/testthat/test-xpose_data.R @@ -33,9 +33,6 @@ test_that('properly creates the xpdb when using the file argument', { skip_on_cran() # Skip to avoid issue with no long double # Correct path and quiet option for identical comparison with xpdb_ex_pk - xpdb_1$summary$value[xpdb_1$summary$label == 'dir'] <- 'analysis/models/pk/' - xpdb_1$options$dir <- 'analysis/models/pk/' - attr(xpdb_1$code, 'dir') <- 'analysis/models/pk/' xpdb_1$options$quiet <- FALSE xpdb_1$xp_theme$labeller <- xpdb_ex_pk$xp_theme$labeller xpdb_1$xp_theme <- as.xpose.theme(xpdb_1$xp_theme) @@ -51,10 +48,6 @@ test_that('properly creates the xpdb when using the runno argument', { skip_on_cran() # Skip to avoid issue with no long double # Correct path and quiet option for identical comparison with xpdb_ex_pk - xpdb_2$summary$value[xpdb_2$summary$label == 'dir'] <- 'analysis/models/pk/' - xpdb_2$options$dir <- 'analysis/models/pk/' - attr(xpdb_2$code, 'dir') <- 'analysis/models/pk/' - attr(xpdb_2$gg_theme, 'theme') <- 'theme_readable' xpdb_2$options$quiet <- FALSE xpdb_2$xp_theme$labeller <- xpdb_ex_pk$xp_theme$labeller xpdb_2$xp_theme <- as.xpose.theme(xpdb_2$xp_theme) diff --git a/vignettes/plot_list.Rmd b/vignettes/plot_list.Rmd index ece47b50..c6976abc 100755 --- a/vignettes/plot_list.Rmd +++ b/vignettes/plot_list.Rmd @@ -88,14 +88,14 @@ xpdb_ex_pk %>% ``` ### Censored vpc -```{r} +```{r, eval = FALSE} xpdb_ex_pk %>% vpc_data(vpc_type = 'censored', opt = vpc_opt(lloq = 1, n_bins = 7)) %>% vpc() ``` ### Categorical vpc -```{r, eval=FALSE} +```{r, eval = FALSE} xpdb_ex_pk %>% vpc_data(vpc_type = 'categorical') %>% vpc() diff --git a/vignettes/vpc.Rmd b/vignettes/vpc.Rmd index 64906b3e..e775b1c1 100755 --- a/vignettes/vpc.Rmd +++ b/vignettes/vpc.Rmd @@ -55,7 +55,7 @@ vpc(xpdb_w_vpc) # Plot the vpc from the stored data ``` Multiple VPC data can be stored in an xpdb, but only one of each `vpc_type`. -```{r, warning = FALSE} +```{r, eval = FALSE, warning = FALSE} xpdb_w_multi_vpc <- xpdb_ex_pk %>% vpc_data(vpc_type = 'continuous', opt = vpc_opt(n_bins = 6, lloq = 0.1)) %>% vpc_data(vpc_type = 'censored', opt = vpc_opt(n_bins = 6, lloq = 0.1)) @@ -70,7 +70,7 @@ vpc(xpdb_w_multi_vpc, vpc_type = 'censored') * The `stratify` options defines up to two stratifying variable to be used when computing the VPC data. The `stratify` variables can either be provided as a character vector (`stratify = c('SEX', 'MED1')`) or a formula (`stratify = SEX~MED1`) . The former will result in the use of `ggforce::facet_wrap_paginate()` and the latter of `ggforce::facet_grid_paginate()` when creating the plot. With "categorical" VPC the "group" variable will also be added by default. * More advanced options (i.e. binning, pi, ci, predcorr, lloq, etc.) are accessible via the `opt` argument. The `opt` argument expects the output from the `vpc_opt()` functions argument. -```{r, warning = FALSE} +```{r, eval = FALSE, warning = FALSE} xpdb_ex_pk %>% vpc_data(vpc_type = 'censored', stratify = 'SEX', opt = vpc_opt(bins = 'jenks', n_bins = 7, lloq = 0.5)) %>% @@ -96,7 +96,7 @@ xpdb_ex_pk %>% ``` ### Creating the VPC using a PsN folder -The `vpc_data()` contains an argument `psn_foler` which can be used to point to a [PsN](https://uupharmacometrics.github.io/PsN/) generated VPC folder. As in most xpose function `template_titles` keywords can be used to automatize the process e.g. `psn_folder = '@dir/@run_vpc'` where `@dir` and `@run` will be automatically translated to initial (i.e. when the xpdb was generated) run directory and run number `'analysis/models/pk/run001_vpc'`. +The `vpc_data()` contains an argument `psn_folder` which can be used to point to a [PsN](https://uupharmacometrics.github.io/PsN/) generated VPC folder. As in most xpose function `template_titles` keywords can be used to automatize the process e.g. `psn_folder = '@dir/@run_vpc'` where `@dir` and `@run` will be automatically translated to initial (i.e. when the xpdb was generated) run directory and run number `'analysis/models/pk/run001_vpc'`. In this case, the data will be read from the `/m1` sub-folder (or `m1.zip` if compressed). Note that [PsN](https://uupharmacometrics.github.io/PsN/) drops unused columns to reduce the simtab file size. Thus, in order to allow for more flexibility in R, it is recommended to use multiple stratifying variables (`-stratify_on=VAR1,VAR2`) and the prediction corrected (`-predcorr` adds the PRED column to the output) options in [PsN](https://uupharmacometrics.github.io/PsN/) to avoid having to rerun [PsN](https://uupharmacometrics.github.io/PsN/) to add these variables later on. In addition, `-dv`, `-idv`, `-lloq`, `-uloq`, `-predcorr` and `-stratify_on` [PsN](https://uupharmacometrics.github.io/PsN/) options are automatically applied to xpose VPC.