diff --git a/.Rbuildignore b/.Rbuildignore index bf7a74b4..a86e2892 100755 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -17,7 +17,7 @@ ^ROADMAP\.md$ ^temporary$ ^vignettes/about.*$ -^vignettes/bestiarium.*$ +^vignettes/plot_list.*$ ^vignettes/cheatsheet.pdf$ ^vignettes/faq.*$ ^vignettes/interactive_plots.*$ diff --git a/DESCRIPTION b/DESCRIPTION index 6601b5e0..8be28b15 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: xpose Type: Package Title: Diagnostics for Pharmacometric Models -Version: 0.4.4 +Version: 0.4.5 Authors@R: c( person('Benjamin', 'Guiastrennec', role = c('aut', 'cre', 'cph'), @@ -24,22 +24,23 @@ Description: Diagnostics for non-linear mixed-effects (population) and provide 'ggplot2'-based graphics for data exploration and model diagnostics. Depends: - R (>= 3.1.2), - ggplot2 (>= 2.2.1) + R (>= 3.3.0), + ggplot2 (>= 3.1.0) Imports: - dplyr (>= 0.7.0), - ggforce, + dplyr (>= 0.8.0), + ggforce (>= 0.2.0), grDevices, - purrr (>= 0.2.0), - readr, - rlang (>= 0.1.2), - stringr, - tibble (>= 1.3.1), - tidyr (>= 0.6), + purrr (>= 0.3.0), + readr (>= 1.3.0), + rlang (>= 0.3.0), + stringr (>= 1.4.0), + tibble (>= 2.1.0), + tidyr (>= 0.8.0), utils, stats, - vpc (>= 1.0.0) + vpc (>= 1.1.0) Suggests: + here, gridExtra, rmarkdown, knitr, diff --git a/NAMESPACE b/NAMESPACE index fbe244e5..049dcb01 100755 --- a/NAMESPACE +++ b/NAMESPACE @@ -124,6 +124,7 @@ export(theme_bw2) export(theme_readable) export(theme_xp_default) export(theme_xp_xpose4) +export(tidyr_new_interface) export(transform_prm) export(ungroup) export(update_args) @@ -157,3 +158,4 @@ importFrom(dplyr,ungroup) importFrom(ggforce,facet_grid_paginate) importFrom(ggforce,facet_wrap_paginate) importFrom(purrr,"%>%") +importFrom(rlang,":=") diff --git a/NEWS.md b/NEWS.md index e3690e03..a1fec95a 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# xpose 0.4.5 +## General +* The `gg_theme` argument in `xpose_data`, `update_themes` or plots now accepts a function returning a complete ggplot2 theme. In addition theme `gg_theme` can now accept theme elements in `update_themes` and plots. (#157) +* Added compatibility with tidyr 1.0.0 (#166) +* Small fixes to vignettes, documentations and website + # xpose 0.4.4 ### General * Improved documentation for `xpose_data` (@billdenney #99) diff --git a/R/fetch_data.R b/R/fetch_data.R index ccd77469..bf9f4d65 100755 --- a/R/fetch_data.R +++ b/R/fetch_data.R @@ -108,7 +108,7 @@ only_distinct <- function(xpdb, .problem, facets, quiet) { stringr::str_c(var_stg, collapse = ', ')) msg(msg_stg, .(quiet)) - dplyr::distinct_(.data = x, .dots = var_stg, .keep_all = TRUE) + dplyr::distinct(.data = x, !!!rlang::syms(var_stg), .keep_all = TRUE) }) fun @@ -141,13 +141,13 @@ reorder_factors <- function(prefix, suffix = NULL) { # Only sort factors function(x) { levels <- x %>% - dplyr::distinct_(.dots = 'variable') %>% + dplyr::distinct(!!rlang::sym('variable')) %>% dplyr::mutate(variable_order = substring(.$variable, 1, 2)) %>% dplyr::mutate(variable_order = dplyr::case_when(.$variable_order == 'TH' ~ 1, .$variable_order == 'OM' ~ 2, .$variable_order == 'SI' ~ 3, TRUE ~ 0)) %>% - dplyr::arrange_(.dots = 'variable_order') + dplyr::arrange_at(.vars = 'variable_order') dplyr::mutate(.data = x, variable = factor(x$variable, levels = levels$variable)) } @@ -212,9 +212,10 @@ fetch_data <- function(xpdb, stringr::str_c(stringr::str_c(index_col[1:5], collapse = ', '), '... and', length(index_col) - 5 , 'more variables', sep = ' '), stringr::str_c(index_col , collapse = ', ')) %>% - {msg(c('Tidying data by ', .), quiet)} - data <- tidyr::gather_(data = data, key_col = 'variable', value_col = 'value', - gather_cols = colnames(data)[!colnames(data) %in% index_col]) + {msg(c('Tidying data by ', .), quiet)} + + data <- tidyr::gather(data = data, key = 'variable', value = 'value', + !!!rlang::syms(colnames(data)[!colnames(data) %in% index_col])) } if (is.function(post_processing)) data <- post_processing(data) diff --git a/R/list_nm_tables.R b/R/list_nm_tables.R index bf92a484..6e654e81 100755 --- a/R/list_nm_tables.R +++ b/R/list_nm_tables.R @@ -29,8 +29,9 @@ list_nm_tables <- function(nm_model = NULL) { if (nrow(table_list) == 0) return(null_object) table_list <- table_list %>% - dplyr::group_by_(.dots = c('problem', 'level')) %>% + dplyr::group_by_at(.vars = c('problem', 'level')) %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(string = purrr::map_chr(.$data, ~stringr::str_c(.$code, collapse = ' '))) %>% dplyr::mutate(file = stringr::str_match(.$string, '\\s+FILE\\s*=\\s*([^\\s]+)')[, 2]) %>% dplyr::filter(!is.na(.$file)) @@ -46,8 +47,9 @@ list_nm_tables <- function(nm_model = NULL) { # Prep simtab flag sim_flag <- nm_model %>% dplyr::filter(.$problem > 0) %>% - dplyr::group_by_(.dots = 'problem') %>% + dplyr::group_by_at(.vars = 'problem') %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(simtab = purrr::map_lgl(.$data, ~!any(stringr::str_detect(.$subroutine, 'est')))) %>% dplyr::select(dplyr::one_of(c('problem', 'simtab'))) diff --git a/R/plot_vpc.R b/R/plot_vpc.R index 2f73984b..48c0b2e6 100755 --- a/R/plot_vpc.R +++ b/R/plot_vpc.R @@ -20,14 +20,13 @@ #' @param log String assigning logarithmic scale to axes, can be either '', #' 'x', y' or 'xy'. #' @param guide Enable guide display in vpc continuous (e.g. lloq and uloq lines). -#' @param gg_theme A ggplot2 theme object (e.g. \code{\link[ggplot2]{theme_classic}}). -#' @param xp_theme An xpose theme or vector of modifications to the xpose theme -#' (e.g. \code{c(point_color = 'red', line_linetype = 'dashed')}). #' @param area_fill Shaded areas filling color, should be a vector of 3 values (i.e. low, med, high). #' @param line_linetype Lines linetype, should be a vector of 3 values (i.e. low, med, high). #' @param quiet Logical, if \code{FALSE} messages are printed to the console. #' @param ... any additional aesthetics. #' +#' @inheritParams update_themes +#' #' @section Layers mapping: #' Plots can be customized by mapping arguments to specific layers. The naming convention is #' layer_option where layer is one of the names defined in the list below and option is @@ -116,9 +115,18 @@ vpc <- function(xpdb, # Check type check_plot_type(type, allowed = c('a', 'l', 'p', 'r', 't')) - # Assing xp_theme and gg_theme + # Assign xp_theme if (!missing(xp_theme)) xpdb <- update_themes(xpdb = xpdb, xp_theme = xp_theme) - if (missing(gg_theme)) gg_theme <- xpdb$gg_theme + + # Assign gg_theme + if (missing(gg_theme)) { + gg_theme <- xpdb$gg_theme + } else { + gg_theme <- update_themes(xpdb = xpdb, gg_theme = gg_theme)$gg_theme + } + if (is.function(gg_theme)) { + gg_theme <- do.call(gg_theme, args = list()) + } # Create ggplot base if (is.null(mapping)) mapping <- aes() @@ -234,10 +242,10 @@ vpc <- function(xpdb, name = 'rug', ggfun = 'geom_rug', rug_data = vpc_dat$aggr_obs %>% - dplyr::distinct_(.dots = c('bin', stratify), .keep_all = TRUE) %>% + dplyr::distinct(!!!rlang::syms(c('bin', stratify)), .keep_all = TRUE) %>% dplyr::filter(!is.na(.$bin)) %>% tidyr::gather(key = 'edges', value = 'idv', dplyr::one_of('bin_min', 'bin_max')) %>% - dplyr::distinct_(.dots = c(stratify, 'idv'), .keep_all = TRUE)) + dplyr::distinct(!!!rlang::syms(c(stratify, 'idv')), .keep_all = TRUE)) )) } @@ -263,15 +271,15 @@ vpc <- function(xpdb, scale_linetype_manual(values = line_linetype) # Add metadata to plots - xp$xpose <- dplyr::data_frame(problem = vpc_prob, subprob = 0L, - descr = c('VPC directory', 'Number of simulations for VPC', - 'VPC confidence interval', 'VPC prediction interval', - 'VPC lower limit of quantification', 'VPC upper limit of quantification'), - label = c('vpcdir', 'vpcnsim', 'vpcci', 'vpcpi', 'vpclloq', 'vpculoq'), - value = c(vpc_dat$vpc_dir, vpc_dat$nsim, - 100*diff(vpc_dat$opt$ci), 100*diff(vpc_dat$opt$pi), - ifelse(is.null(vpc_dat$lloq), 'na', vpc_dat$lloq), - ifelse(is.null(vpc_dat$uloq), 'na', vpc_dat$uloq))) %>% + xp$xpose <- dplyr::tibble(problem = vpc_prob, subprob = 0L, + descr = c('VPC directory', 'Number of simulations for VPC', + 'VPC confidence interval', 'VPC prediction interval', + 'VPC lower limit of quantification', 'VPC upper limit of quantification'), + label = c('vpcdir', 'vpcnsim', 'vpcci', 'vpcpi', 'vpclloq', 'vpculoq'), + value = c(vpc_dat$vpc_dir, vpc_dat$nsim, + 100*diff(vpc_dat$opt$ci), 100*diff(vpc_dat$opt$pi), + ifelse(is.null(vpc_dat$lloq), 'na', vpc_dat$lloq), + ifelse(is.null(vpc_dat$uloq), 'na', vpc_dat$uloq))) %>% dplyr::bind_rows(xpdb$summary) %>% {list(fun = stringr::str_c('vpc_', vpc_dat$type), summary = ., diff --git a/R/print_xpose_data.R b/R/print_xpose_data.R index ab80c34f..c7082de7 100755 --- a/R/print_xpose_data.R +++ b/R/print_xpose_data.R @@ -21,8 +21,9 @@ print.xpose_data <- function(x, ...) { tab_names <- x$data %>% dplyr::filter(.$simtab == FALSE) %>% dplyr::mutate(grouping = 1:n()) %>% - dplyr::group_by_(.dots = 'grouping') %>% + dplyr::group_by_at(.vars = 'grouping') %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(string = purrr::map_chr(.$data, summarize_table_names)) %>% {stringr::str_c(.$string, collapse = '\n ')} } else { @@ -34,8 +35,9 @@ print.xpose_data <- function(x, ...) { sim_names <- x$data %>% dplyr::filter(.$simtab == TRUE) %>% dplyr::mutate(grouping = 1:n()) %>% - dplyr::group_by_(.dots = 'grouping') %>% + dplyr::group_by_at(.vars = 'grouping') %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(string = purrr::map_chr(.$data, summarize_table_names)) %>% {stringr::str_c(.$string, collapse = '\n ')} } else { @@ -45,8 +47,8 @@ print.xpose_data <- function(x, ...) { # Summarize file names if (!is.null(x$files)) { out_names <- x$files %>% - dplyr::distinct_(.dots = 'name', .keep_all = TRUE) %>% - dplyr::arrange_(.dots = c('name')) %>% + dplyr::distinct(!!rlang::sym('name'), .keep_all = TRUE) %>% + dplyr::arrange_at(.vars = 'name') %>% {stringr::str_c(.$name, ifelse(.$modified, ' (modified)', ''), collapse = ', ')} } else { out_names <- '' diff --git a/R/prm_table.R b/R/prm_table.R index 4c13c5f0..5b8f15e2 100755 --- a/R/prm_table.R +++ b/R/prm_table.R @@ -39,8 +39,8 @@ prm_table <- function(xpdb, uncertainty_lab <- ifelse(transform, 'RSE', 'SE') if (!transform) prm$rse <- prm$se - header <- dplyr::data_frame(name = 'Parameter', label = 'Label', - value = 'Value', rse = uncertainty_lab, fixed = ' ') + header <- dplyr::tibble(name = 'Parameter', label = 'Label', + value = 'Value', rse = uncertainty_lab, fixed = ' ') cat('\nEstimates for $prob no.', prm_attr$problem, ', subprob no.', prm_attr$subprob, ', method ', prm_attr$method, '\n', sep = '') diff --git a/R/read_nm_files.R b/R/read_nm_files.R index f4e1a3d5..991aa76a 100755 --- a/R/read_nm_files.R +++ b/R/read_nm_files.R @@ -59,8 +59,9 @@ read_nm_files <- function(runno = NULL, dplyr::filter(file.exists(.$path)) %>% dplyr::mutate(grouping = 1:n(), raw = purrr::map(.$path, .f = readr::read_lines)) %>% - dplyr::group_by_(.dots = 'grouping') %>% + dplyr::group_by_at(.vars = 'grouping') %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(tmp = purrr::map(.$data, .f = parse_nm_files, quiet)) %>% dplyr::mutate(drop = purrr::map_lgl(.$tmp, is.null)) @@ -68,8 +69,8 @@ read_nm_files <- function(runno = NULL, out %>% dplyr::filter(!.$drop) %>% - tidyr::unnest_(unnest_cols = 'data') %>% - tidyr::unnest_(unnest_cols = 'tmp') %>% + tidyr::unnest(dplyr::one_of('data')) %>% + tidyr::unnest(dplyr::one_of('tmp')) %>% dplyr::mutate(extension = get_extension(.$name, dot = FALSE), modified = FALSE) %>% dplyr::select(dplyr::one_of('name', 'extension', 'problem', 'subprob', @@ -131,9 +132,13 @@ parse_nm_files <- function(dat, quiet) { dplyr::mutate(problem = as.numeric(.$problem), subprob = as.numeric(.$subprob), raw = stringr::str_trim(.$raw, side = 'both')) %>% - dplyr::group_by_(.dots = c('problem', 'subprob', 'method')) %>% + dplyr::group_by_at(.vars = c('problem', 'subprob', 'method')) %>% tidyr::nest() %>% - dplyr::mutate(data = purrr::map(.$data, .f = raw_to_tibble, sep = sep, file = dat$name)) + dplyr::ungroup() %>% + dplyr::mutate(data = purrr::map(.$data, + .f = raw_to_tibble, + sep = sep, + file = dat$name)) } diff --git a/R/read_nm_tables.R b/R/read_nm_tables.R index 852f0620..d17a585f 100755 --- a/R/read_nm_tables.R +++ b/R/read_nm_tables.R @@ -91,7 +91,7 @@ read_nm_tables <- function(file = NULL, if (nrow(tables_zip) > 0) { tables <- tables %>% dplyr::bind_rows(tables_zip) %>% - dplyr::arrange_(.dots = c('problem', 'file')) + dplyr::arrange_at(.vars = c('problem', 'file')) } } } @@ -100,22 +100,24 @@ read_nm_tables <- function(file = NULL, tables %>% dplyr::mutate(grouping = 1:n(), name = stringr::str_c(basename(.$file), dplyr::if_else(.$firstonly, ' (firstonly)', ''))) %>% - dplyr::group_by_(.dots = c('problem', 'simtab')) %>% + dplyr::group_by_at(.vars = c('problem', 'simtab')) %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(string = purrr::map_chr(.$data, ~stringr::str_c(.$name, collapse = ', '))) %>% {stringr::str_c(.$string, ' [$prob no.', .$problem, dplyr::if_else(.$simtab, ', simulation', ''), ']', collapse = '\n ')} %>% - {msg(c('Reading: ', .), quiet)} + {msg(c('Reading: ', .), quiet)} # Collect options for table import tables <- tables %>% dplyr::mutate(top = purrr::map(.$file, ~readr::read_lines(file = ., n_max = 3)), grouping = 1:n()) %>% - dplyr::group_by_(.dots = 'grouping') %>% + dplyr::group_by_at(.vars = 'grouping') %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(args = purrr::map(.x = .$data, .f = read_args, quiet, ...)) %>% - tidyr::unnest_(unnest_cols = 'data') %>% - tidyr::unnest_(unnest_cols = 'args') %>% + tidyr::unnest(dplyr::one_of('data')) %>% + tidyr::unnest(dplyr::one_of('args')) %>% dplyr::mutate(name = basename(.$file)) %>% dplyr::select(dplyr::one_of('problem', 'name', 'simtab', 'firstonly', 'fun', 'params')) @@ -136,20 +138,40 @@ read_nm_tables <- function(file = NULL, # Index datasets tables <- tables %>% dplyr::mutate(grouping = 1:n()) %>% - dplyr::group_by_(.dots = 'grouping') %>% - tidyr::nest(.key = 'tmp') %>% + dplyr::group_by_at(.vars = 'grouping') + + ## TEMP handling + if (tidyr_new_interface()) { + tables <- tables %>% tidyr::nest(tmp = -dplyr::one_of('grouping')) + } else { + tables <- tables %>% tidyr::nest(.key = 'tmp') + } + ## END TEMP + + tables <- tables %>% + dplyr::ungroup() %>% dplyr::mutate(index = purrr::map(.$tmp, index_table), nrow = purrr::map_dbl(.$tmp, ~nrow(.$data[[1]]))) %>% - tidyr::unnest_(unnest_cols = 'tmp') %>% + tidyr::unnest(dplyr::one_of('tmp')) %>% dplyr::ungroup() # Combine tables with same number of rows tables <- tables %>% - dplyr::group_by_(.dots = c('problem', 'simtab', 'firstonly')) %>% - tidyr::nest(.key = 'tmp') %>% + dplyr::group_by_at(.vars = c('problem', 'simtab', 'firstonly')) + + ## TEMP handling + if (tidyr_new_interface()) { + tables <- tables %>% tidyr::nest(tmp = -dplyr::one_of('problem', 'simtab', 'firstonly')) + } else { + tables <- tables %>% tidyr::nest(.key = 'tmp') + } + ## END TEMP + + tables <- tables %>% + dplyr::ungroup() %>% dplyr::mutate(out = purrr::map(.$tmp, combine_tables)) %>% - tidyr::unnest_(unnest_cols = 'out') %>% + tidyr::unnest(dplyr::one_of('out')) %>% dplyr::select(dplyr::one_of('problem', 'simtab', 'firstonly', 'data', 'index')) if (nrow(tables) == 0) stop('No table imported.', call. = FALSE) @@ -158,23 +180,43 @@ read_nm_tables <- function(file = NULL, if (rm_duplicates) { tables <- tables %>% dplyr::mutate(grouping = 1:n()) %>% - dplyr::group_by_(.dots = 'grouping') %>% - tidyr::nest(.key = 'tmp') %>% + dplyr::group_by_at(.vars = 'grouping') + + ## TEMP handling + if (tidyr_new_interface()) { + tables <- tables %>% tidyr::nest(tmp = -dplyr::one_of('grouping')) + } else { + tables <- tables %>% tidyr::nest(.key = 'tmp') + } + ## END TEMP + + tables <- tables %>% + dplyr::ungroup() %>% dplyr::mutate(out = purrr::map(.$tmp, ~dplyr::select(.$data[[1]], dplyr::one_of(unique(unlist(.$index[[1]]$col)))))) %>% - tidyr::unnest_(unnest_cols = 'tmp') %>% + tidyr::unnest(dplyr::one_of('tmp')) %>% dplyr::select(dplyr::one_of('problem', 'simtab', 'firstonly', 'index', 'out')) %>% - dplyr::rename_(.dots = c('data' = 'out')) + dplyr::rename(!!rlang::sym('data') := dplyr::one_of('out')) } # Merge firsonly tables with main tables if (any(tables$firstonly)) { msg('Consolidating tables with `firstonly`', quiet) tables <- tables %>% - dplyr::group_by_(.dots = c('problem', 'simtab')) %>% - tidyr::nest(.key = 'tmp') %>% + dplyr::group_by_at(.vars = c('problem', 'simtab')) + + ## TEMP handling + if (tidyr_new_interface()) { + tables <- tables %>% tidyr::nest(tmp = -dplyr::one_of('problem', 'simtab')) + } else { + tables <- tables %>% tidyr::nest(.key = 'tmp') + } + ## END TEMP + + tables <- tables %>% + dplyr::ungroup() %>% dplyr::mutate(out = purrr::map(.$tmp, merge_firstonly, quiet)) %>% - tidyr::unnest_(unnest_cols = 'out') %>% + tidyr::unnest(dplyr::one_of('out')) %>% dplyr::select(dplyr::one_of('problem', 'simtab', 'data', 'index')) } @@ -183,15 +225,25 @@ read_nm_tables <- function(file = NULL, # Convert catcov, id, occ, dvid to factor tables <- tables %>% dplyr::mutate(grouping = .$problem) %>% - dplyr::group_by_(.dots = 'grouping') %>% - tidyr::nest(.key = 'tmp') %>% + dplyr::group_by_at(.vars = 'grouping') + + ## TEMP handling + if (tidyr_new_interface()) { + tables <- tables %>% tidyr::nest(tmp = -dplyr::one_of('grouping')) + } else { + tables <- tables %>% tidyr::nest(.key = 'tmp') + } + ## END TEMP + + tables <- tables %>% + dplyr::ungroup() %>% dplyr::mutate(tmp = purrr::map(.$tmp, function(x) { col_to_factor <- colnames(x$data[[1]]) %in% x$index[[1]]$col[x$index[[1]]$type %in% c('catcov', 'id', 'occ', 'dvid')] x$data[[1]] <- dplyr::mutate_if(x$data[[1]], col_to_factor, as.factor) x })) %>% - tidyr::unnest_(unnest_cols = 'tmp') %>% + tidyr::unnest(dplyr::one_of('tmp')) %>% dplyr::mutate(modified = FALSE) %>% dplyr::select(dplyr::one_of('problem', 'simtab', 'index', 'data', 'modified')) diff --git a/R/summarise_nm_model.R b/R/summarise_nm_model.R index bf810372..d1bde21d 100755 --- a/R/summarise_nm_model.R +++ b/R/summarise_nm_model.R @@ -39,10 +39,10 @@ summarise_nm_model <- function(file, model, software, rounding) { if (nrow(tmp) == 0) return(sum) tmp %>% - tidyr::complete_(cols = c(quote(problem), quote(label)), - fill = list(subprob = 0, value = 'na')) %>% + tidyr::complete(!!!rlang::syms(c('problem', 'label')), + fill = list(subprob = 0, value = 'na')) %>% dplyr::bind_rows(dplyr::filter(sum, sum$problem == 0)) %>% - dplyr::arrange_(.dots = c('problem', 'label', 'subprob')) %>% + dplyr::arrange_at(.vars = c('problem', 'label', 'subprob')) %>% dplyr::mutate(descr = dplyr::case_when( .$label == 'software' ~ 'Software', .$label == 'version' ~ 'Software version', @@ -201,7 +201,7 @@ sum_description <- function(model, software) { end <- ifelse(length(end) == 0, nrow(x), min(end) - 1) x <- dplyr::slice(.data = x, seq(start, end)) %>% - {stringr::str_replace(.$comment, '^\\s*;\\s*', '')} %>% + {stringr::str_replace(.$comment, '^\\s*;\\s*', '')} %>% stringr::str_c(collapse = ' ') %>% {sum_tpl('descr', stringr::str_match(., ':\\s*(.+)$')[, 2])} return(value = x) @@ -215,7 +215,7 @@ sum_input_data <- function(model, software) { if (software == 'nonmem') { x <- model %>% dplyr::filter(.$subroutine == 'dat') %>% - dplyr::distinct_(.dots = 'level', .keep_all = TRUE) # Assumes that the data is on the first row + dplyr::distinct(!!rlang::sym('level'), .keep_all = TRUE) # Assumes that the data is on the first row if (nrow(x) == 0) return(sum_tpl('data', 'na')) @@ -322,7 +322,7 @@ sum_runtime <- function(model, software) { if (nrow(x) == 0) return(sum_tpl('runtime', 'na')) x %>% - dplyr::group_by_(.dots = 'problem') %>% + dplyr::group_by_at(.vars = 'problem') %>% dplyr::mutate(subprob = (1:n()) - 1) %>% dplyr::ungroup() %>% dplyr::mutate(label = 'runtime', @@ -359,12 +359,13 @@ sum_term <- function(model, software) { x %>% dplyr::slice(purrr::map2(start, end, ~seq(.x,.y)) %>% purrr::flatten_int()) %>% - dplyr::group_by_(.dots = 'problem') %>% + dplyr::group_by_at(.vars = 'problem') %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(value = purrr::map_chr(.$data, function(y) { drop <- min(which(stringr::str_detect(y$code, 'NO. OF'))) dplyr::slice(.data = y, seq(1, (drop - 1))) %>% - {stringr::str_trim(.$code)} %>% + {stringr::str_trim(.$code)} %>% stringr::str_trunc(width = 56) %>% stringr::str_c(collapse = '\n') %>% stringr::str_replace('0MINIM', 'MINIM')})) %>% @@ -385,14 +386,15 @@ sum_warnings <- function(model, software) { x %>% dplyr::mutate(problem = stringr::str_match(.$code, 'FOR PROBLEM\\s+(\\d+)')[, 2]) %>% - tidyr::fill_(fill_cols = 'problem') %>% + tidyr::fill(!!rlang::sym('problem')) %>% dplyr::mutate(problem = as.numeric(.$problem)) %>% dplyr::filter(!stringr::str_detect(.$code, 'FOR PROBLEM\\s+(\\d+)')) %>% dplyr::mutate(code = stringr::str_trim(.$code)) %>% dplyr::mutate(code = stringr::str_trunc(.$code, width = 56)) %>% - dplyr::distinct_(.dots = c('problem', 'code')) %>% - dplyr::group_by_(.dots = 'problem') %>% + dplyr::distinct(!!!rlang::syms(c('problem', 'code'))) %>% + dplyr::group_by_at(.vars = 'problem') %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(value = purrr::map_chr(.$data, ~stringr::str_c(.$code, collapse = '\n'))) %>% dplyr::mutate(subprob = 0, label = 'warnings') %>% dplyr::select(dplyr::one_of('problem', 'subprob', 'label', 'value')) @@ -433,8 +435,9 @@ sum_condn <- function(model, software, rounding) { if (nrow(x) == 0) return(sum_tpl('condn', 'na')) x %>% - dplyr::group_by_(.dots = 'problem') %>% + dplyr::group_by_at(.vars = 'problem') %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(subprob = 0, label = 'condn', value = purrr::map_chr(.$data, function(x) { @@ -494,7 +497,7 @@ sum_ofv <- function(model, software) { x %>% dplyr::mutate(value = stringr::str_match(.$code, '\\*\\s+(.+)\\s+\\*')[, 2]) %>% - dplyr::group_by_(.dots = 'problem') %>% + dplyr::group_by_at(.vars = 'problem') %>% dplyr::mutate(subprob = (1:n()) - 1, label = 'ofv') %>% dplyr::select(dplyr::one_of('problem', 'subprob', 'label', 'value')) %>% dplyr::ungroup() @@ -523,7 +526,7 @@ sum_method <- function(model, software) { dplyr::mutate(value = stringr::str_c(stringr::str_to_lower(.$value), dplyr::if_else(.$inter, '-i', ''), dplyr::if_else(.$lapl, ' laplacian', ''), dplyr::if_else(.$like, ' likelihood', ''))) %>% - dplyr::group_by_(.dots = 'problem') %>% + dplyr::group_by_at(.vars = 'problem') %>% dplyr::mutate(subprob = (1:n()) - 1, label = 'method') %>% dplyr::select(dplyr::one_of('problem', 'subprob', 'label', 'value')) %>% dplyr::ungroup() @@ -537,8 +540,9 @@ sum_shk <- function(model, software, type, rounding) { ## Method 3 (worse one) x <- model %>% dplyr::filter(.$subroutine == 'lst') %>% - dplyr::group_by_(.dots = 'problem') %>% + dplyr::group_by_at(.vars = 'problem') %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(start = purrr::map_int(.x = .$data, .f = function(x) { stringr::str_c(stringr::str_to_upper(type), 'SHRINK[^V]') %>% stringr::regex(ignore_case = TRUE) %>% @@ -550,25 +554,35 @@ sum_shk <- function(model, software, type, rounding) { if (nrow(x) == 0) return(sum_tpl(stringr::str_c(type, 'shk'), 'na')) - x %>% + x <- x %>% dplyr::mutate(rows = purrr::map2(.x = .$data, .y = .$start, .f = function(x, start) { x$code[start:nrow(x)] %>% - {start + (which.max(stringr::str_detect(., '^\\s+\\D')[-1]) - 1)} %>% - {seq(start, .)}})) %>% + {start + (which.max(stringr::str_detect(., '^\\s+\\D')[-1]) - 1)} %>% + {seq(start, .)}})) %>% dplyr::mutate(code = purrr::map2_chr(.x = .$data, .y = .$rows, ~stringr::str_c(.x$code[.y], collapse = ' '))) %>% dplyr::mutate(code = stringr::str_match(.$code, '\\Q(%)\\E:*\\s*(.+)')[, 2]) %>% dplyr::mutate(code = stringr::str_split(.$code, '\\s+')) %>% dplyr::mutate(value = purrr::map(.$code, ~round(as.numeric(.), digits = rounding)), grouping = purrr::map(.$code, ~stringr::str_c(' [', 1:length(.), ']', sep = ''))) %>% - dplyr::group_by_(.dots = 'problem') %>% + dplyr::group_by_at(.vars = 'problem') %>% dplyr::mutate(subprob = (1:n()) - 1) %>% - dplyr::ungroup() %>% - tidyr::unnest_(unnest_cols = c('value', 'grouping')) %>% + dplyr::ungroup() + + ## TEMP handling + if (tidyr_new_interface()) { + x <- x %>% tidyr::unnest(cols = dplyr::one_of('value', 'grouping')) + } else { + x <- x %>% tidyr::unnest(dplyr::one_of('value', 'grouping')) + } + ## END TEMP + + x %>% dplyr::filter(.$value != 100) %>% dplyr::mutate(value = stringr::str_c(.$value, .$grouping)) %>% - dplyr::group_by_(.dots = c('problem', 'subprob')) %>% + dplyr::group_by_at(.vars = c('problem', 'subprob')) %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(label = stringr::str_c(type, 'shk'), value = purrr::map_chr(.$data, ~stringr::str_c(.$value, collapse = ', '))) %>% dplyr::select(dplyr::one_of('problem', 'subprob', 'label', 'value')) %>% diff --git a/R/summary_xpose_data.R b/R/summary_xpose_data.R index 7f635bb4..3506a22c 100755 --- a/R/summary_xpose_data.R +++ b/R/summary_xpose_data.R @@ -20,8 +20,9 @@ summary.xpose_data <- function(object, .problem = NULL, ...) { out <- get_summary(object, .problem, only_last = FALSE) %>% dplyr::filter(.$value != 'na') %>% dplyr::slice(order(match(.$label, order))) %>% - dplyr::group_by_(.dots = c('problem', 'label', 'descr')) %>% + dplyr::group_by_at(.vars = c('problem', 'label', 'descr')) %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(value = purrr::map_chr(.$data, function(x) { if (nrow(x) == 1) return(x$value) value <- stringr::str_c(x$value, ' (subprob no.', x$subprob, ')', sep = '') @@ -33,8 +34,9 @@ summary.xpose_data <- function(object, .problem = NULL, ...) { dplyr::mutate(descr = stringr::str_c(.$descr, '@', .$label, '')) %>% dplyr::mutate(string = stringr::str_c(' -', .$descr, ':', .$value, sep = ' '), grouping = as.character(.$problem)) %>% - dplyr::group_by_(.dots = 'grouping') %>% + dplyr::group_by_at(.vars = 'grouping') %>% tidyr::nest() %>% + dplyr::ungroup() %>% {purrr::map(.$data, function(x) { x <- dplyr::filter(.data = x, !stringr::str_detect(x$descr, 'Problem number')) if (x$problem[1] == 0) { diff --git a/R/temporary.R b/R/temporary.R new file mode 100644 index 00000000..1ea5b568 --- /dev/null +++ b/R/temporary.R @@ -0,0 +1,11 @@ +#' Check tidyr version +#' +#' @description Check the version of tidyr to handle the gap between v0.8.3 and v1.0.0 +#' +#' @return the package version of tidyr +#' +#' @keywords internal +#' @export +tidyr_new_interface <- function() { + utils::packageVersion("tidyr") > "0.8.99" +} diff --git a/R/update_themes.R b/R/update_themes.R index a6fa2cc5..0415cd47 100755 --- a/R/update_themes.R +++ b/R/update_themes.R @@ -1,27 +1,31 @@ #' Create xpose theme #' -#' @description Create an xpose theme. -#' This function will update the theme of an xpdb object. -#' All plots generated with this xpdb will automatically use the -#' defined xpose (\code{xp_theme}) and ggplot2 (\code{gg_theme}) themes. +#' @description Create an xpose theme. This function will update the theme of an +#' xpdb object. All plots generated with this xpdb will automatically use the +#' defined xpose (\code{xp_theme}) and ggplot2 (\code{gg_theme}) themes. #' -#' @param xpdb An \code{xpose_data} object generated with \code{\link{xpose_data}}. -#' @param gg_theme A ggplot2 theme object (e.g. \code{\link[ggplot2]{theme_classic}}). -#' @param xp_theme An xpose theme or vector of modifications to the xpose theme -#' (e.g. \code{c(point_color = 'red', line_linetype = 'dashed')}). +#' @param xpdb An \code{xpose_data} object generated with +#' \code{\link{xpose_data}}. +#' @param gg_theme A complete ggplot2 theme object (e.g. +#' \code{\link[ggplot2]{theme_classic}}), a function returning a complete +#' ggplot2 theme, or a change to the current \code{gg_theme}. +#' @param xp_theme A complete xpose theme object (e.g. +#' \code{\link{theme_xp_default}}) or a list of modifications to the current +#' \code{xp_theme} (e.g. \code{list(point_color = 'red', line_linetype = +#' 'dashed')}). #' @param quiet Logical, if \code{FALSE} messages are printed to the console. #' #' @examples #' # Before default theme #' dv_vs_ipred(xpdb_ex_pk, facets = 'SEX') -#' +#' #' # Updating the gg_theme and xp_theme -#' xpdb_ex_pk %>% -#' update_themes(gg_theme = theme_bw(), +#' xpdb_ex_pk %>% +#' update_themes(gg_theme = theme(legend.position = 'top'), #' xp_theme = list(point_color = 'blue', -#' line_color = 'blue')) %>% +#' line_color = 'blue')) %>% #' dv_vs_ipred(facets = 'SEX') -#' +#' #' @export update_themes <- function(xpdb = NULL, gg_theme = NULL, @@ -32,14 +36,18 @@ update_themes <- function(xpdb = NULL, if (missing(quiet)) quiet <- xpdb$options$quiet # Replace/Update gg_theme - if (is.theme(gg_theme)) { - if (attr(gg_theme, 'complete')) { + if (is.function(gg_theme) || is.theme(gg_theme)) { + if (is.function(gg_theme) || attr(gg_theme, 'complete')) { attr(gg_theme, 'theme') <- as.character(substitute(gg_theme)) xpdb$gg_theme <- gg_theme + } else if (is.function(xpdb$gg_theme)) { + gg_theme_attr <- paste(attr(xpdb$gg_theme, 'theme'), '(modified)') + xpdb$gg_theme <- do.call(xpdb$gg_theme, args = list()) + gg_theme + attr(xpdb$gg_theme, 'theme') <- gg_theme_attr } else { attr(xpdb$gg_theme, 'theme') <- paste(attr(xpdb$gg_theme, 'theme'), '(modified)') xpdb$gg_theme <- xpdb$gg_theme + gg_theme - } + } } else if (!is.null(gg_theme) & !is.theme(gg_theme)) { msg('`gg_theme` argument not used. Reason: invalid input.', quiet) } diff --git a/R/vars_list.R b/R/vars_list.R index 4e015f6a..22f5e38d 100755 --- a/R/vars_list.R +++ b/R/vars_list.R @@ -28,13 +28,15 @@ list_vars <- function(xpdb, .problem = NULL) { x <- x %>% dplyr::mutate(grouping = as.integer(.$problem)) %>% - dplyr::group_by_(.dots = 'grouping') %>% + dplyr::group_by_at(.vars = 'grouping') %>% tidyr::nest() %>% + dplyr::ungroup() %>% {purrr::map(.$data, function(df) { cat('\nList of available variables for problem no.', df$problem[1], '\n') df$index[[1]] %>% - dplyr::group_by_(.dots = 'type') %>% + dplyr::group_by_at(.vars = 'type') %>% tidyr::nest() %>% + dplyr::ungroup() %>% dplyr::mutate(string = purrr::map_chr(.$data, ~stringr::str_c(unique(.$col), collapse = ', ')), descr = dplyr::case_when(.$type == 'id' ~ 'Subject identifier (id)', .$type == 'occ' ~ 'Occasion flag (occ)', diff --git a/R/vars_set.R b/R/vars_set.R index 26f0259d..f30a41c3 100755 --- a/R/vars_set.R +++ b/R/vars_set.R @@ -62,13 +62,23 @@ set_var_types <- function(xpdb, .problem = NULL, ..., auto_factor = TRUE, quiet) if (is.null(args)) return(xpdb) args <- args %>% - dplyr::data_frame(col = ., type = names(.)) %>% + dplyr::tibble(col = ., type = names(.)) %>% dplyr::mutate(type = stringr::str_replace(.$type, '\\d$', '')) - xpdb$data <- dat %>% + dat <- dat %>% dplyr::mutate(grouping = .$problem) %>% - dplyr::group_by_(.dots = 'grouping') %>% - tidyr::nest(.key = 'tmp') %>% + dplyr::group_by_at(.vars = 'grouping') + + ## TEMP handling + if (tidyr_new_interface()) { + dat <- dat %>% tidyr::nest(tmp = -dplyr::one_of('grouping')) + } else { + dat <- dat %>% tidyr::nest(.key = 'tmp') + } + ## END TEMP + + xpdb$data <- dat %>% + dplyr::ungroup() %>% dplyr::mutate(out = purrr::map_if(.$tmp, .$grouping %in% .problem, function(x, args, quiet) { # Get the index index <- x$index[[1]] @@ -76,8 +86,8 @@ set_var_types <- function(xpdb, .problem = NULL, ..., auto_factor = TRUE, quiet) # Check for missmatches if (any(!args$col %in% index$col)) { warning(c('In $prob no.', x$problem, ' columns: ', - stringr::str_c(args$col[!args$col %in% index$col], collapse = ', '), - ' not present in the data.'), call. = FALSE) + stringr::str_c(args$col[!args$col %in% index$col], collapse = ', '), + ' not present in the data.'), call. = FALSE) args <- dplyr::filter(.data = args, args$col %in% index$col) } @@ -90,7 +100,7 @@ set_var_types <- function(xpdb, .problem = NULL, ..., auto_factor = TRUE, quiet) for (repl in 1:nrow(args)) { index$type[index$col == args$col[repl]] <- args$type[repl] } - x$index[[1]] <- index + x$index[[1]] <- index # Change categorical covariates to factor if (any(args$type == 'catcov') && auto_factor) { @@ -102,7 +112,7 @@ set_var_types <- function(xpdb, .problem = NULL, ..., auto_factor = TRUE, quiet) # Output new index x }, args = args, quiet = quiet)) %>% - tidyr::unnest_(unnest_cols = 'out') %>% + tidyr::unnest(dplyr::one_of('out')) %>% dplyr::select(dplyr::one_of('problem', 'simtab', 'index', 'data', 'modified')) as.xpdb(xpdb) @@ -125,12 +135,22 @@ set_var_generic <- function(xpdb, .problem = NULL, what = NULL, ..., quiet) { args <- c(...) if (is.null(args)) return(xpdb) - args <- dplyr::data_frame(col = names(args), variable = args) + args <- dplyr::tibble(col = names(args), variable = args) - xpdb$data <- dat %>% + dat <- dat %>% dplyr::mutate(grouping = .$problem) %>% - dplyr::group_by_(.dots = 'grouping') %>% - tidyr::nest(.key = 'tmp') %>% + dplyr::group_by_at(.vars = 'grouping') + + ## TEMP handling + if (tidyr_new_interface()) { + dat <- dat %>% tidyr::nest(tmp = -dplyr::one_of('grouping')) + } else { + dat <- dat %>% tidyr::nest(.key = 'tmp') + } + ## END TEMP + + xpdb$data <- dat %>% + dplyr::ungroup() %>% dplyr::mutate(out = purrr::map_if(.$tmp, .$grouping %in% .problem, function(x, args, quiet) { # Get the index index <- x$index[[1]] @@ -138,8 +158,8 @@ set_var_generic <- function(xpdb, .problem = NULL, what = NULL, ..., quiet) { # Check for missmatches if (any(!args$col %in% index$col)) { warning(c('In $prob no.', x$problem, ' columns: ', - stringr::str_c(args$col[!args$col %in% index$col], collapse = ', '), - ' not present in the data.'), call. = FALSE) + stringr::str_c(args$col[!args$col %in% index$col], collapse = ', '), + ' not present in the data.'), call. = FALSE) args <- dplyr::filter(.data = args, args$col %in% index$col) } @@ -150,7 +170,7 @@ set_var_generic <- function(xpdb, .problem = NULL, what = NULL, ..., quiet) { # Output new index x }, args = args, quiet = quiet)) %>% - tidyr::unnest_(unnest_cols = 'out') %>% + tidyr::unnest(dplyr::one_of('out')) %>% dplyr::select(dplyr::one_of('problem', 'simtab', 'index', 'data', 'modified')) as.xpdb(xpdb) diff --git a/R/vpc_data.R b/R/vpc_data.R index e01a41cb..80634a87 100755 --- a/R/vpc_data.R +++ b/R/vpc_data.R @@ -152,8 +152,9 @@ vpc_data <- function(xpdb, purrr::map_at('vpc_dat', function(x) { x <- x %>% tidyr::gather(key = 'tmp', value = 'value', dplyr::matches('\\.(low|med|up)')) %>% - tidyr::separate_('tmp', into = c('Simulations', 'ci'), sep = '\\.') %>% - tidyr::spread_(key_col = 'ci', value_col = 'value') + tidyr::separate(col = !!rlang::sym('tmp'), + into = c('Simulations', 'ci'), sep = '\\.') %>% + tidyr::spread(key = 'ci', value = 'value') if (vpc_type == 'continuous') { x <- dplyr::mutate(.data = x, @@ -202,7 +203,7 @@ vpc_data <- function(xpdb, obs_cols = obs_cols, sim_cols = sim_cols, nsim = vpc_nsim)) %>% {dplyr::tibble(problem = vpc_prob, method = 'vpc', type = vpc_type, data = list(.), modified = FALSE)} %>% {dplyr::bind_rows(xpdb$special, .)} %>% - dplyr::distinct_(.dots = c('problem', 'method', 'type'), .keep_all = TRUE) + dplyr::distinct(!!!rlang::syms(c('problem', 'method', 'type')), .keep_all = TRUE) msg('\nVPC done', quiet) as.xpdb(xpdb) diff --git a/R/vpc_helpers.R b/R/vpc_helpers.R index 23c1949a..ae055b3d 100755 --- a/R/vpc_helpers.R +++ b/R/vpc_helpers.R @@ -97,8 +97,8 @@ psn_vpc_parser <- function(xpdb, psn_folder, psn_bins, opt, quiet) { # Get list of options from PsN psn_opt <- readr::read_lines(file = file_path(psn_folder, 'version_and_option_info.txt')) psn_cmd <- psn_opt[which(stringr::str_detect(psn_opt, '^Command:')) + 1] - psn_opt <- dplyr::data_frame(raw = psn_opt[stringr::str_detect(psn_opt,'^-')]) %>% - tidyr::separate_(col = 'raw', into = c('arg', 'value'), sep = '=') %>% + psn_opt <- dplyr::tibble(raw = psn_opt[stringr::str_detect(psn_opt,'^-')]) %>% + tidyr::separate(col = 'raw', into = c('arg', 'value'), sep = '=') %>% dplyr::mutate(arg = stringr::str_replace(.$arg, '^-', '')) # Sets obs and sim cols diff --git a/R/xpdb_access.R b/R/xpdb_access.R index ab9fadc6..8cd2f8dd 100755 --- a/R/xpdb_access.R +++ b/R/xpdb_access.R @@ -93,20 +93,40 @@ get_data <- function(xpdb, # When selecting tables based on their name full_index <- x %>% dplyr::select(dplyr::one_of('problem', 'index')) %>% - tidyr::unnest_(unnest_cols = 'index') + tidyr::unnest(dplyr::one_of('index')) if (any(!table %in% full_index$table)) { stop(stringr::str_c(table[!table %in% full_index$table], collapse = ', '), ' not found in model output data.', call. = FALSE) } x <- full_index[full_index$table %in% table, ] %>% - dplyr::group_by_(.dots = c('problem', 'table')) %>% - tidyr::nest(.key = 'tmp') %>% + dplyr::group_by_at(.vars = c('problem', 'table')) + + ## TEMP handling + if (tidyr_new_interface()) { + x <- x %>% tidyr::nest(tmp = -dplyr::one_of('problem', 'table')) + } else { + x <- x %>% tidyr::nest(.key = 'tmp') + } + ## END TEMP + + x <- x %>% + dplyr::ungroup() %>% dplyr::mutate(cols = purrr::map(.$tmp, ~.$col)) %>% - dplyr::group_by_(.dots = 'table') %>% - tidyr::nest(.key = 'tmp') %>% + dplyr::group_by_at(.vars = 'table') + + ## TEMP handling + if (tidyr_new_interface()) { + x <- x %>% tidyr::nest(tmp = -dplyr::one_of('table')) + } else { + x <- x %>% tidyr::nest(.key = 'tmp') + } + ## END TEMP + + x <- x %>% + dplyr::ungroup() %>% dplyr::mutate(out = purrr::map(.$tmp, function(y) { - x[x$problem == y$problem, ]$data[[1]][, y$cols[[1]]] + xpdb$data[xpdb$data$problem == y$problem, ]$data[[1]][, y$cols[[1]]] })) if (length(unique(x$table)) > 1) { @@ -383,8 +403,8 @@ get_prm <- function(xpdb, prms <- purrr::map_df(prm_trans_formula, ~transform_prm(.x, mu = prm_mean, sigma = prm_cov, method = 'delta')) %>% dplyr::mutate(se = sqrt(.$variance)) } else { - prms <- dplyr::data_frame(mean = purrr::flatten_dbl(prm_mean), - se = purrr::flatten_dbl(prm_se)) %>% + prms <- dplyr::tibble(mean = purrr::flatten_dbl(prm_mean), + se = purrr::flatten_dbl(prm_se)) %>% dplyr::mutate(rse = .$se/abs(.$mean)) } @@ -399,7 +419,7 @@ get_prm <- function(xpdb, rse = ifelse(.$fixed, NA_real_, abs(as.numeric(.$rse)))) %>% tidyr::separate(col = 'number', into = c('m', 'n'), sep = ',', fill = 'right') %>% dplyr::mutate(diagonal = dplyr::if_else(.$m == .$n, TRUE, FALSE)) %>% - dplyr::rename_(.dots = list(value = 'mean')) %>% + dplyr::rename(!!rlang::sym('value') := !!rlang::sym('mean')) %>% dplyr::mutate(label = '', value = signif(.$value, digits = digits), se = signif(.$se, digits = digits), @@ -409,7 +429,7 @@ get_prm <- function(xpdb, order = dplyr::case_when(type == 'the' ~ 1, type == 'ome' ~ 2, TRUE ~ 3)) %>% - dplyr::arrange_(.dots = 'order') %>% + dplyr::arrange_at(.vars = 'order') %>% dplyr::select(dplyr::one_of('type', 'name', 'label', 'value', 'se', 'rse', 'fixed', 'diagonal', 'm', 'n')) # Assign THETA labels diff --git a/R/xpdb_edits.R b/R/xpdb_edits.R index 3de3e843..ea63695d 100755 --- a/R/xpdb_edits.R +++ b/R/xpdb_edits.R @@ -111,7 +111,7 @@ rename.xpose_data <- function(.data, ..., .problem, .source, .where) { #' ungroup(.problem = 1) %>% #' xplot_distrib(aes(x = CMAX, density_fill = SEX), type = 'dr') #' -#' @name summarize_xpdb +#' @name summarise_xpdb #' @export group_by.xpose_data <- function(.data, ..., .problem, .source, .where) { edit_xpose_data(.fun = dplyr::group_by, .fname = 'group_by', .data = .data, @@ -120,7 +120,7 @@ group_by.xpose_data <- function(.data, ..., .problem, .source, .where) { #' @method ungroup xpose_data -#' @name summarize_xpdb +#' @name summarise_xpdb #' @export ungroup.xpose_data <- function(x, ..., .problem, .source, .where) { edit_xpose_data(.fun = dplyr::ungroup, .fname = 'ungroup', .data = x, @@ -128,22 +128,19 @@ ungroup.xpose_data <- function(x, ..., .problem, .source, .where) { } -#' @method summarize xpose_data -#' @name summarize_xpdb -#' @export -summarize.xpose_data <- function(.data, ..., .problem, .source, .where) { - edit_xpose_data(.fun = dplyr::summarize, .fname = 'summarize', .data = .data, - .problem = .problem, .source = .source, .where = .where, ...) -} - #' @method summarise xpose_data -#' @name summarize_xpdb +#' @name summarise_xpdb #' @export summarise.xpose_data <- function(.data, ..., .problem, .source, .where) { - edit_xpose_data(.fun = dplyr::summarise, .fname = 'summarize', .data = .data, + edit_xpose_data(.fun = dplyr::summarise, .fname = 'summarise', .data = .data, .problem = .problem, .source = .source, .where = .where, ...) } +#' @method summarize xpose_data +#' @name summarise_xpdb +#' @export +summarize.xpose_data <- summarise.xpose_data + #' Master xpdb editing function #' @@ -184,7 +181,7 @@ edit_xpose_data <- function(.fun, .fname, .data, ..., .problem, .source, .where) # do dplyr operation outside of mutate to avoid problems with n() xpdb[['data']]$data <- purrr::map_if(xpdb[['data']]$data, xpdb[['data']]$problem %in% .problem, - .f = .fun, !!!rlang::quos(...)) + .f = .fun, !!!rlang::enquos(...)) xpdb[['data']] <- xpdb[['data']] %>% dplyr::mutate(modified = dplyr::if_else(.$problem %in% .problem, TRUE, .$modified)) @@ -204,26 +201,38 @@ edit_xpose_data <- function(.fun, .fname, .data, ..., .problem, .source, .where) check_quo_vars(xpdb = xpdb, ..., .source = .source, .problem = .problem) xpdb[['special']] <- xpdb[['special']] %>% - dplyr::group_by_('problem') %>% - tidyr::nest(.key = 'tmp') + dplyr::group_by_at(.vars = 'problem') + + ## TEMP handling + if (tidyr_new_interface()) { + xpdb[['special']] <- xpdb[['special']] %>% + tidyr::nest(tmp = -dplyr::one_of('problem')) %>% + dplyr::ungroup() + } else { + xpdb[['special']] <- xpdb[['special']] %>% + tidyr::nest(.key = 'tmp') %>% + dplyr::ungroup() + } + ## END TEMP xpdb[['special']]$tmp <- purrr::map_if(.x = xpdb[['special']]$tmp, .p = xpdb[['special']]$problem %in% .problem, - .f = function(.x, .fun, .where, ...) { - if (.x$method == 'vpc') { - if (any(!.where %in% names(.x$data[[1]]))) { - warning('elements ', stringr::str_c(.where[!.where %in% names(.x$data[[1]])], collapse = ', '), - ' not found in ', .x$method, ' ', .x$type, call. = FALSE) - } - .x$data[[1]] <- .x$data[[1]] %>% - purrr::map_at(.at = .where, .f = .fun, ...) - .x$modified <- TRUE - return(.x) - } else { - stop('edits of `', .x$method, '` data are not yet supported in xpose.', call. = FALSE) - } - }, .fun = .fun, .where = .where, !!!rlang::quos(...)) + .f = function(.x, .fun, .where, ...) { + if (.x$method == 'vpc') { + if (any(!.where %in% names(.x$data[[1]]))) { + warning('elements ', stringr::str_c(.where[!.where %in% names(.x$data[[1]])], collapse = ', '), + ' not found in ', .x$method, ' ', .x$type, call. = FALSE) + } + .x$data[[1]] <- .x$data[[1]] %>% + purrr::map_at(.at = .where, .f = .fun, ...) + .x$modified <- TRUE + return(.x) + } else { + stop('edits of `', .x$method, '` data are not yet supported in xpose.', call. = FALSE) + } + }, .fun = .fun, .where = .where, !!!rlang::enquos(...)) - xpdb[['special']] <- tidyr::unnest(xpdb[['special']]) + xpdb[['special']] <- xpdb[['special']] %>% + tidyr::unnest(dplyr::one_of('tmp')) } else { if (missing(.problem)) .problem <- max(xpdb[['files']]$problem) if (!all(.source %in% xpdb[['files']]$extension)) { @@ -239,8 +248,8 @@ edit_xpose_data <- function(.fun, .fname, .data, ..., .problem, .source, .where) check_quo_vars(xpdb = xpdb, ..., .source = .source, .problem = .problem) xpdb[['files']]$data <- purrr::map_if(.x = xpdb[['files']]$data, .p = xpdb[['files']]$problem %in% .problem & - xpdb[['files']]$extension %in% .source, - .f = .fun, !!!rlang::quos(...)) + xpdb[['files']]$extension %in% .source, + .f = .fun, !!!rlang::enquos(...)) xpdb[['files']] <- xpdb[['files']] %>% dplyr::mutate(modified = dplyr::if_else(.$problem %in% .problem & .$extension %in% .source, TRUE, .$modified)) } @@ -258,9 +267,19 @@ edit_xpose_data <- function(.fun, .fname, .data, ..., .problem, .source, .where) #' @keywords internal #' @export xpdb_index_update <- function(xpdb, .problem) { - xpdb[['data']] %>% - dplyr::group_by_(.dots = 'problem') %>% - tidyr::nest(.key = 'tmp') %>% + dat <- xpdb[['data']] %>% + dplyr::group_by_at(.vars = 'problem') + + ## TEMP handling + if (tidyr_new_interface()) { + dat <- dat %>% tidyr::nest(tmp = -dplyr::one_of('problem')) + } else { + dat <- dat %>% tidyr::nest(.key = 'tmp') + } + ## END TEMP + + dat %>% + dplyr::ungroup() %>% dplyr::mutate(tmp = purrr::map_if(.$tmp, xpdb[['data']]$problem %in% .problem, function(x) { @@ -280,7 +299,7 @@ xpdb_index_update <- function(xpdb, .problem) { } x })) %>% - tidyr::unnest_(unnest_cols = 'tmp') + tidyr::unnest(dplyr::one_of('tmp')) } @@ -302,7 +321,7 @@ xpdb_index_update <- function(xpdb, .problem) { check_quo_vars <- function(xpdb, ..., .source, .problem) { if (.source == 'special') return(invisible()) - quo_vars <- rlang::quos(...) %>% + quo_vars <- rlang::enquos(...) %>% purrr::map(all.vars) %>% purrr::flatten_chr() @@ -323,7 +342,7 @@ check_quo_vars <- function(xpdb, ..., .source, .problem) { dplyr::mutate(string = stringr::str_c('missing: ', .$missing, ' variables in ', ifelse(.source == 'data', '', stringr::str_c('`', .source, '` file ')), '$prob no.', .$problem, '.')) %>% - {stop(stringr::str_c(.$string, collapse = '\n '), call. = FALSE)} + {stop(stringr::str_c(.$string, collapse = '\n '), call. = FALSE)} } } } diff --git a/R/xplot_distrib.R b/R/xplot_distrib.R index c7293944..f2d71df8 100755 --- a/R/xplot_distrib.R +++ b/R/xplot_distrib.R @@ -64,9 +64,18 @@ xplot_distrib <- function(xpdb, # Check type check_plot_type(type, allowed = c('d', 'h', 'r')) - # Assing xp_theme and gg_theme + # Assign xp_theme if (!missing(xp_theme)) xpdb <- update_themes(xpdb = xpdb, xp_theme = xp_theme) - if (missing(gg_theme)) gg_theme <- xpdb$gg_theme + + # Assign gg_theme + if (missing(gg_theme)) { + gg_theme <- xpdb$gg_theme + } else { + gg_theme <- update_themes(xpdb = xpdb, gg_theme = gg_theme)$gg_theme + } + if (is.function(gg_theme)) { + gg_theme <- do.call(gg_theme, args = list()) + } # Create ggplot base xp <- ggplot(data = data, aes_filter(mapping, keep_only = c('x', 'y'))) + gg_theme diff --git a/R/xplot_helpers.R b/R/xplot_helpers.R index 07cfc46b..661dc72d 100755 --- a/R/xplot_helpers.R +++ b/R/xplot_helpers.R @@ -383,9 +383,9 @@ xp_var <- function(xpdb, .problem, col = NULL, type = NULL, silent = FALSE) { } index %>% - dplyr::distinct_(.dots = 'col', .keep_all = TRUE) %>% + dplyr::distinct(!!rlang::sym('col'), .keep_all = TRUE) %>% dplyr::select(dplyr::one_of('col', 'type', 'label', 'units')) %>% - dplyr::arrange_(.dots = c('type', 'col')) + dplyr::arrange_at(.vars = c('type', 'col')) } diff --git a/R/xplot_qq.R b/R/xplot_qq.R index c0efd47a..ecd9b530 100755 --- a/R/xplot_qq.R +++ b/R/xplot_qq.R @@ -58,9 +58,18 @@ xplot_qq <- function(xpdb, # Check type check_plot_type(type, allowed = 'p') - # Assing xp_theme and gg_theme + # Assign xp_theme if (!missing(xp_theme)) xpdb <- update_themes(xpdb = xpdb, xp_theme = xp_theme) - if (missing(gg_theme)) gg_theme <- xpdb$gg_theme + + # Assign gg_theme + if (missing(gg_theme)) { + gg_theme <- xpdb$gg_theme + } else { + gg_theme <- update_themes(xpdb = xpdb, gg_theme = gg_theme)$gg_theme + } + if (is.function(gg_theme)) { + gg_theme <- do.call(gg_theme, args = list()) + } # Create ggplot base xp <- ggplot(data = data, mapping) + gg_theme diff --git a/R/xplot_scatter.R b/R/xplot_scatter.R index fec435fe..1ea70d0e 100755 --- a/R/xplot_scatter.R +++ b/R/xplot_scatter.R @@ -16,14 +16,13 @@ #' @param caption Page caption. Use \code{NULL} to remove. #' @param tag Plot identification tag. Use \code{NULL} to remove. #' @param plot_name Name to be used by \code{xpose_save()} when saving the plot. -#' @param gg_theme A ggplot2 theme object (e.g. \code{\link[ggplot2]{theme_classic}}). -#' @param xp_theme An xpose theme or vector of modifications to the xpose theme -#' (e.g. \code{c(point_color = 'red', line_linetype = 'dashed')}). #' @param opt A list of options in order to create appropriate data input for #' ggplot2. For more information see \code{\link{data_opt}}. #' @param quiet Logical, if \code{FALSE} messages are printed to the console. #' @param ... Any additional aesthetics. #' +#' @inheritParams update_themes +#' #' @section Layers mapping: #' Plots can be customized by mapping arguments to specific layers. The naming convention is #' layer_option where layer is one of the names defined in the list below and option is @@ -106,9 +105,18 @@ xplot_scatter <- function(xpdb, # Check type check_plot_type(type, allowed = c('l', 'p', 's', 't')) - # Assing xp_theme and gg_theme + # Assign xp_theme if (!missing(xp_theme)) xpdb <- update_themes(xpdb = xpdb, xp_theme = xp_theme) - if (missing(gg_theme)) gg_theme <- xpdb$gg_theme + + # Assign gg_theme + if (missing(gg_theme)) { + gg_theme <- xpdb$gg_theme + } else { + gg_theme <- update_themes(xpdb = xpdb, gg_theme = gg_theme)$gg_theme + } + if (is.function(gg_theme)) { + gg_theme <- do.call(gg_theme, args = list()) + } # Create ggplot base xp <- ggplot(data = data, mapping) + gg_theme diff --git a/R/xpose.R b/R/xpose.R index ceb30fd4..e25232a1 100755 --- a/R/xpose.R +++ b/R/xpose.R @@ -6,4 +6,6 @@ #' To learn more about xpose, visit our website: \url{https://UUPharmacometrics.github.io/xpose/}. #' @import ggplot2 #' @importFrom dplyr n +#' @importFrom rlang := +#' @keywords internal "_PACKAGE" diff --git a/R/xpose_data.R b/R/xpose_data.R index bca85446..882a878e 100755 --- a/R/xpose_data.R +++ b/R/xpose_data.R @@ -2,67 +2,82 @@ #' #' @description Gather model outputs into a R database #' -#' @param runno Run number to be used to generate model file name. Used in combination with \code{prefix} and \code{ext}. -#' @param prefix Prefix to be used to generate model file name. Used in combination with \code{runno} and \code{ext}. -#' @param ext Extension to be used to generate model file name.Should be one of '.lst' (default), '.out', '.res', '.mod' or '.ctl' for NONMEM. -#' @param file Model file name (preferably a '.lst' file) containing the file extension. Alternative to \code{prefix}, -#' \code{runno} and \code{ext} arguments. +#' @param runno Run number to be used to generate model file name. Used in +#' combination with \code{prefix} and \code{ext}. +#' @param prefix Prefix to be used to generate model file name. Used in +#' combination with \code{runno} and \code{ext}. +#' @param ext Extension to be used to generate model file name.Should be one of +#' '.lst' (default), '.out', '.res', '.mod' or '.ctl' for NONMEM. +#' @param file Model file name (preferably a '.lst' file) containing the file +#' extension. Alternative to \code{prefix}, \code{runno} and \code{ext} +#' arguments. #' @param dir Location of the model files. -#' @param gg_theme A ggplot2 theme object (e.g. \code{\link[ggplot2]{theme_classic}}). -#' @param xp_theme An xpose theme or vector of modifications to the xpose theme -#' (e.g. \code{c(point_color = 'red', line_linetype = 'dashed')}). -#' @param simtab If \code{TRUE} only reads in simulation tables, if \code{FALSE} only reads estimation tables. -#' Default \code{NULL} reads all tables. Option not compatible with manual_import. -#' @param manual_import If \code{NULL} (default) the names of the output tables to import will be obtained from the model file. -#' To manually import files as in previous versions of xpose, the check the function \code{\link{manual_nm_import}}. -#' @param ignore Character vector be used to ignore the import/generation of: 'data', 'files', 'summary' or any -#' combination of the three. -#' @param extra_files A vector of additional output file extensions to be imported. Default is '.ext', '.cov', '.cor', '.phi', -#' ".grd" for NONMEM. +#' @param gg_theme A complete ggplot2 theme object (e.g. +#' \code{\link[ggplot2]{theme_classic}}), or a function returning a complete +#' ggplot2 theme. +#' @param xp_theme A complete xpose theme object (e.g. +#' \code{\link{theme_xp_default}}). +#' @param simtab If \code{TRUE} only reads in simulation tables, if \code{FALSE} +#' only reads estimation tables. Default \code{NULL} reads all tables. Option +#' not compatible with manual_import. +#' @param manual_import If \code{NULL} (default) the names of the output tables +#' to import will be obtained from the model file. To manually import files as +#' in previous versions of xpose, the check the function +#' \code{\link{manual_nm_import}}. +#' @param ignore Character vector be used to ignore the import/generation of: +#' 'data', 'files', 'summary' or any combination of the three. +#' @param extra_files A vector of additional output file extensions to be +#' imported. Default is '.ext', '.cov', '.cor', '.phi', ".grd" for NONMEM. #' @param quiet Logical, if \code{FALSE} messages are printed to the console. -#' @param ... Additional arguments to be passed to the \code{\link{read_nm_tables}} functions. -#' -#' @section File path generation: -#' The rules for model file names generation are as follow: -#' \itemize{ -#' \item with \code{runno}: the full path is generated as \code{/.} e.g. with \code{dir = 'model/pk'}, \code{prefix = 'run'}, \code{runno = '001'}, -#' \code{ext = '.lst'} the resulting path would be \code{model/pk/run001.lst} -#' \item with \code{file}: the full path is generated as \code{/} e.g. with \code{dir = 'model/pk'}, \code{file = 'run001.lst'} the resulting path -#' would also be \code{model/pk/run001.lst}. Note: in this case the file extension should be provided as part of the `file` argument. +#' @param ... Additional arguments to be passed to the +#' \code{\link{read_nm_tables}} functions. +#' +#' @section File path generation: The rules for model file names generation are +#' as follow: \itemize{ +#' \item with \code{runno}: the full path is generated as +#' \code{/.} e.g. with \code{dir = 'model/pk'}, +#' \code{prefix = 'run'}, \code{runno = '001'}, \code{ext = '.lst'} the +#' resulting path would be \code{model/pk/run001.lst} +#' \item with \code{file}: +#' the full path is generated as \code{/} e.g. with \code{dir = +#' 'model/pk'}, \code{file = 'run001.lst'} the resulting path would also be +#' \code{model/pk/run001.lst}. Note: in this case the file extension should be +#' provided as part of the `file` argument. #' } -#' -#' @section Table format requirement: -#' When importing data, an \code{ID} column must be present in at least one table for each problem and for each `firstonly` -#' category. \code{ID} columns are required to properly combine/merge tables and removing \code{NA} records. If -#' \code{ID} columns are missing xpose will return the following warning: \code{Dropped `` due to missing -#' required `ID` column.}. -#' +#' +#' @section Table format requirement: When importing data, an \code{ID} column +#' must be present in at least one table for each problem and for each +#' `firstonly` category. \code{ID} columns are required to properly +#' combine/merge tables and removing \code{NA} records. If \code{ID} columns +#' are missing xpose will return the following warning: \code{Dropped +#' `` due to missing required `ID` column.} +#' #' @examples #' \dontrun{ #' # Using the `file` argument to point to the model file: #' xpdb <- xpose_data(file = 'run001.lst', dir = 'models') -#' +#' #' # Using the `runno` argument to point to the model file: #' xpdb <- xpose_data(runno = '001', ext = '.lst', dir = 'models') -#' +#' #' # Using the `extra_files` argument to import specific output files only: #' xpdb <- xpose_data(file = 'run001.lst', dir = 'models', extra_files = c('.ext', '.phi')) -#' +#' #' # Using `ignore` to disable import of tables and output files: #' xpdb <- xpose_data(file = 'run001.lst', dir = 'models', ignore = c('data', 'files')) -#' +#' #' # Using `simtab` to disable import of simulation tables #' xpdb <- xpose_data(file = 'run001.lst', dir = 'models', simtab = FALSE) -#' +#' #' } -#' +#' #' @export xpose_data <- function(runno = NULL, prefix = 'run', ext = '.lst', file = NULL, dir = NULL, - gg_theme = theme_readable(), + gg_theme = theme_readable, xp_theme = theme_xp_default(), simtab = NULL, manual_import = NULL, @@ -75,12 +90,12 @@ xpose_data <- function(runno = NULL, stop('Argument `runno` or `file` required.', call. = FALSE) } - if (!is.theme(gg_theme) || !attr(gg_theme, 'complete')) { - stop('Argument `gg_theme` must be a full ggplot2 theme. To modify a theme use update_themes() instead.', call. = FALSE) + if (!is.function(gg_theme) && (!is.theme(gg_theme) || !attr(gg_theme, 'complete'))) { + stop('Argument `gg_theme` must be a full ggplot2 theme or a function returning a theme. To modify a pre-existing theme use update_themes() instead.', call. = FALSE) } if (!is.xpose.theme(xp_theme)) { - stop('Argument `xp_theme` must be a full xpose theme. To modify a theme use update_themes() instead.', call. = FALSE) + stop('Argument `xp_theme` must be a full xpose theme. To modify a theme use update_themes() instead.', call. = FALSE) } if (missing(quiet)) quiet <- !interactive() @@ -168,11 +183,3 @@ xpose_data <- function(runno = NULL, manual_import = manual_import)) %>% structure(class = c('xpose_data', 'uneval')) } - -# Allow assignment into xpose_data without conversion to class uneval -# `[[<-.xpose_data` <- function(x, i, value) { -# x <- unclass(x) -# x[[i]] <- value -# as.xpdb(x) -# } -# `$<-.xpose_data` <- `[[<-.xpose_data` diff --git a/R/zzz.R b/R/zzz.R index dd25f73d..8f88f6e2 100755 --- a/R/zzz.R +++ b/R/zzz.R @@ -1,11 +1,11 @@ -.onAttach <- function(...) { - - if (!interactive()) return() - - text <- c('Note: the next xpose release (v0.5) will bring some major changes.\nIf you rely on xpose for your work, please keep an eye on our github:\nhttps://github.com/UUPharmacometrics/xpose') - - packageStartupMessage(sample(text, size = 1)) -} +# .onAttach <- function(...) { +# +# if (!interactive()) return() +# +# text <- c('Note: the next xpose release (v0.5) will bring some major changes.\nIf you rely on xpose for your work, please keep an eye on our github:\nhttps://github.com/UUPharmacometrics/xpose') +# +# packageStartupMessage(sample(text, size = 1)) +# } # Remove CRAN note on no visible binding for global variable utils::globalVariables(c('.', '..density..')) diff --git a/README.Rmd b/README.Rmd index f2458ef3..80dc0765 100755 --- a/README.Rmd +++ b/README.Rmd @@ -30,7 +30,7 @@ knitr::opts_chunk$set(fig.path = 'man/figures/', [![downloads](https://cranlogs.r-pkg.org/badges/grand-total/xpose)](https://CRAN.R-project.org/package=xpose) ## Overview -[xpose](https://UUPharmacometrics.github.io/xpose/) was designed as a [ggplot2](https://github.com/tidyverse/ggplot2)-based alternative to [xpose4](http://xpose.sourceforge.net). xpose aims to reduce the post processing burden and improve diagnostics commonly associated the development of non-linear mixed effect models. +[xpose](https://UUPharmacometrics.github.io/xpose/) was designed as a [ggplot2](https://ggplot2.tidyverse.org/)-based alternative to [xpose4](http://xpose.sourceforge.net). xpose aims to reduce the post processing burden and improve diagnostics commonly associated the development of non-linear mixed effect models. ## Installation @@ -100,10 +100,10 @@ The [xpose website](https://UUPharmacometrics.github.io/xpose/) contains several When working with xpose, a working knowledge of ggplot2 is recommended. Help for ggplot2 can be found in: -- The ggplot2 [documentation](https://docs.ggplot2.org/current/) +- The ggplot2 [documentation](https://ggplot2.tidyverse.org/reference/) - The ggplot2 [mailing list](https://groups.google.com/forum/?fromgroups#!forum/ggplot2) - Internet resources (stack overflow, etc.) ## Contribute -Please note that the xpose project is released with a [Contributor Code of Conduct](.github/CODE_OF_CONDUCT.md) and [contributing guidelines](.github/CONTRIBUTING.md). By contributing to this project, you agree to abide these. +Please note that the xpose project is released with a [Contributor Code of Conduct](https://github.com/UUPharmacometrics/xpose/blob/master/.github/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/UUPharmacometrics/xpose/blob/master/.github/CONTRIBUTING.md). By contributing to this project, you agree to abide these. diff --git a/README.md b/README.md index a3450ac5..19f02122 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Status](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.t ## Overview [xpose](https://UUPharmacometrics.github.io/xpose/) was designed as a -[ggplot2](https://github.com/tidyverse/ggplot2)-based alternative to +[ggplot2](https://ggplot2.tidyverse.org/)-based alternative to [xpose4](http://xpose.sourceforge.net). xpose aims to reduce the post processing burden and improve diagnostics commonly associated the development of non-linear mixed effect models. @@ -53,7 +53,7 @@ xpdb run001.lst overview: - Software: nonmem 7.3.0 - - Attached files (memory usage 1.4 Mb): + - Attached files (memory usage 1.3 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 @@ -160,7 +160,8 @@ several useful articles to make full use of xpose When working with xpose, a working knowledge of ggplot2 is recommended. Help for ggplot2 can be found in: - - The ggplot2 [documentation](https://docs.ggplot2.org/current/) + - The ggplot2 + [documentation](https://ggplot2.tidyverse.org/reference/) - The ggplot2 [mailing list](https://groups.google.com/forum/?fromgroups#!forum/ggplot2) - Internet resources (stack overflow, etc.) @@ -168,6 +169,8 @@ Help for ggplot2 can be found in: ## Contribute Please note that the xpose project is released with a [Contributor Code -of Conduct](.github/CODE_OF_CONDUCT.md) and [contributing -guidelines](.github/CONTRIBUTING.md). By contributing to this project, -you agree to abide these. +of +Conduct](https://github.com/UUPharmacometrics/xpose/blob/master/.github/CODE_OF_CONDUCT.md) +and [Contributing +Guidelines](https://github.com/UUPharmacometrics/xpose/blob/master/.github/CONTRIBUTING.md). +By contributing to this project, you agree to abide these. diff --git a/data-raw/xpdb_ex_pk.R b/data-raw/xpdb_ex_pk.R index bc6338c9..b8850c5f 100755 --- a/data-raw/xpdb_ex_pk.R +++ b/data-raw/xpdb_ex_pk.R @@ -7,12 +7,18 @@ library(xpose) # Generate xpdb -xpdb_ex_pk <- xpose_data(runno = '001', dir = 'inst/extdata/', quiet = FALSE) +xpdb_ex_pk <- xpose_data(runno = '001', + dir = here::here('inst/extdata/'), + quiet = FALSE) -# Overwrite directory paths +# 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/' + +# 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 = 'data/xpdb_ex_pk.rda', compress = 'xz') +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 b289e9eb..0968195b 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 new file mode 100644 index 00000000..5e9fa551 --- /dev/null +++ b/docs/404.html @@ -0,0 +1,195 @@ + + + + + + + + +Page not found (404) • xpose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+
+ + +Content not found. Please use links in the navbar. + +
+ +
+ + + + +
+ + + + + + + + diff --git a/docs/CODE_OF_CONDUCT.html b/docs/CODE_OF_CONDUCT.html index 8266c503..d4a0f99b 100644 --- a/docs/CODE_OF_CONDUCT.html +++ b/docs/CODE_OF_CONDUCT.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,13 +43,14 @@ - + + @@ -56,6 +61,7 @@ + @@ -72,7 +78,7 @@ xpose - 0.4.4 + 0.4.5 @@ -119,13 +125,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - @@ -193,7 +199,7 @@

    Make the changes to the code on your fork.

    • Use the tidyverse coding style.
    • -
    • Any new function should have Roxygen documentation. Internal functions should contain #' @keywords internal. Add examples to new functions. Make sure to update the documentation with devtools::document() before submitting the pull request.
    • +
    • Any new function should have Roxygen documentation. Internal functions should contain #' @keywords internal. Add examples to new functions. Make sure to update the documentation with devtools::document() before submitting the pull request.
    • Tests should be added under tests/testthat/ to ensure for proper code coverage.
    • New plots should be created using the generic xplot_scatter(), xplot_distrib() or xplot_qq(). Check for example the code of R/plot_gof.R to see how it should be done.
    • @@ -203,7 +209,7 @@

    -
  • Run devtools::check() on your fork and ensure the absence of any errors, warnings and notes.
  • +
  • Run devtools::check() on your fork and ensure the absence of any errors, warnings and notes.
  • Create a pull request to the dev branch of the UUPharmacometrics/xpose repository.

    -
  • @@ -181,22 +195,10 @@

    -2018-2019

    +2016

    @@ -226,15 +228,16 @@

    + diff --git a/docs/articles/access_xpdb_data.html b/docs/articles/access_xpdb_data.html index bd439a65..3c044255 100644 --- a/docs/articles/access_xpdb_data.html +++ b/docs/articles/access_xpdb_data.html @@ -13,8 +13,9 @@ - - + + + @@ -38,7 +39,7 @@ xpose - 0.4.4 + 0.4.5 @@ -85,7 +86,7 @@ Functions
  • - Plots + Plots
  • FAQ @@ -119,13 +120,14 @@ +
    +
    + diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-10-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-10-1.png deleted file mode 100644 index 199ef00a..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-10-1.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-11-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-11-1.png deleted file mode 100644 index c4b4cdef..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-11-1.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-1.png deleted file mode 100644 index af7f9e3e..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-1.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-2.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-2.png deleted file mode 100644 index 29afaf6f..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-2.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-3.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-3.png deleted file mode 100644 index ac048b72..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-3.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-4.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-4.png deleted file mode 100644 index d6fa247b..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-2-4.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-3-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-3-1.png deleted file mode 100644 index b9635d56..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-3-1.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-3-2.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-3-2.png deleted file mode 100644 index 761dfc9a..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-3-2.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-4-1.png deleted file mode 100644 index a740a248..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-4-1.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-4-2.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-4-2.png deleted file mode 100644 index 2be9d727..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-4-2.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-4-3.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-4-3.png deleted file mode 100644 index 2ddc9099..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-4-3.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-4-4.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-4-4.png deleted file mode 100644 index b6ed22a6..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-4-4.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-1.png deleted file mode 100644 index 45cae023..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-1.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-2.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-2.png deleted file mode 100644 index fc632b5a..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-5-2.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-6-1.png deleted file mode 100644 index 36719f35..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-6-1.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-1.png deleted file mode 100644 index b2ba5d2d..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-1.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-2.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-2.png deleted file mode 100644 index 458bd803..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-2.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-3.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-3.png deleted file mode 100644 index 4eadc19c..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-3.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-4.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-4.png deleted file mode 100644 index 2551b337..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-7-4.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-1.png deleted file mode 100644 index 1c483768..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-1.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-2.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-2.png deleted file mode 100644 index 219ee416..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-2.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-3.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-3.png deleted file mode 100644 index afe38bc2..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-3.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-4.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-4.png deleted file mode 100644 index 87e293af..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-8-4.png and /dev/null differ diff --git a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-9-1.png b/docs/articles/bestiarium_files/figure-html/unnamed-chunk-9-1.png deleted file mode 100644 index fb48c43b..00000000 Binary files a/docs/articles/bestiarium_files/figure-html/unnamed-chunk-9-1.png and /dev/null differ diff --git a/docs/articles/customize_plots.html b/docs/articles/customize_plots.html index 63a9dffb..1d7518f0 100644 --- a/docs/articles/customize_plots.html +++ b/docs/articles/customize_plots.html @@ -13,8 +13,9 @@ - - + + + @@ -38,7 +39,7 @@ xpose - 0.4.4 + 0.4.5
    @@ -85,7 +86,7 @@ Functions
  • - Plots + Plots
  • FAQ @@ -119,13 +120,14 @@ +

    Using the labs function

    -

    Labels can also modified later on by using the ggplot2::labs() function in combination with the ggplot2 + operator.

    +

    Labels can also modified later on by using the ggplot2::labs() function in combination with the ggplot2 + operator.

    dv_vs_ipred(xpdb) +
       labs(title    = '@descr',
            subtitle = NULL,
    @@ -228,7 +230,7 @@ 

  • 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)
    +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)
    @@ -263,9 +265,9 @@

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

    @@ -287,7 +289,7 @@

    # Update a pre-existing xpdb xpdb <- update_themes(xpdb = xpdb, gg_theme = theme_bw2(), - xp_theme = list(point_color = 'dodgerblue4', + xp_theme = list(point_color = 'dodgerblue4', line_color = 'dodgerblue4'))

    @@ -304,22 +306,26 @@

    + + 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 509c9cc7..d81aad4a 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 gg_theme-1.png b/docs/articles/customize_plots_files/figure-html/demo gg_theme-1.png index cea6ab8d..2ace9e41 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo gg_theme-1.png and b/docs/articles/customize_plots_files/figure-html/demo gg_theme-1.png differ diff --git a/docs/articles/customize_plots_files/figure-html/demo layers-1.png b/docs/articles/customize_plots_files/figure-html/demo layers-1.png index 79383fa7..410bd112 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 2657c9d5..a40fdd6a 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 8ec0164a..e4930fbe 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 b7908a3e..a2b9f93e 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 c8af74a1..6402ab87 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-2.png b/docs/articles/customize_plots_files/figure-html/demo titles-2.png index 836ef9c7..845974bb 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo titles-2.png and b/docs/articles/customize_plots_files/figure-html/demo titles-2.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 19da2ea0..931d734d 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 distrib-1.png b/docs/articles/customize_plots_files/figure-html/demo type distrib-1.png index bc5dc745..7fefe1c9 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo type distrib-1.png and b/docs/articles/customize_plots_files/figure-html/demo type distrib-1.png differ diff --git a/docs/articles/customize_plots_files/figure-html/demo type scatter-1.png b/docs/articles/customize_plots_files/figure-html/demo type scatter-1.png index 0456f949..79c41b4a 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo type scatter-1.png and b/docs/articles/customize_plots_files/figure-html/demo type scatter-1.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 a417f9ac..a16c1a89 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/demo xp_theme-1.png b/docs/articles/customize_plots_files/figure-html/demo xp_theme-1.png index 8be19d7f..1a73edf1 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo xp_theme-1.png and b/docs/articles/customize_plots_files/figure-html/demo xp_theme-1.png differ diff --git a/docs/articles/customize_plots_files/figure-html/demo xpose_labs-1.png b/docs/articles/customize_plots_files/figure-html/demo xpose_labs-1.png index 18bc866d..2d1fc5af 100644 Binary files a/docs/articles/customize_plots_files/figure-html/demo xpose_labs-1.png and b/docs/articles/customize_plots_files/figure-html/demo xpose_labs-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 bae8339e..7faac996 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 3ee2e0c4..5e361122 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 294e033e..fee64eb2 100644 --- a/docs/articles/faq.html +++ b/docs/articles/faq.html @@ -13,8 +13,9 @@ - - + + + @@ -38,7 +39,7 @@ xpose - 0.4.4 + 0.4.5 @@ -85,7 +86,7 @@ Functions
  • - Plots + Plots
  • FAQ @@ -119,13 +120,14 @@ +
    @@ -150,7 +152,7 @@

    From github (current development version)

    1. Make sure you have the devtools package installed
    2. -
    3. Install/update xpose with the following command:
      devtools::install_github('UUPharmacometrics/xpose') +
    4. Install/update xpose with the following command:
      devtools::install_github('UUPharmacometrics/xpose')
    @@ -188,6 +190,7 @@

    + diff --git a/docs/articles/import_model_outputs.html b/docs/articles/import_model_outputs.html index b035fd78..37e4f95c 100644 --- a/docs/articles/import_model_outputs.html +++ b/docs/articles/import_model_outputs.html @@ -13,8 +13,9 @@ - - + + + @@ -38,7 +39,7 @@ xpose - 0.4.4 + 0.4.5 @@ -85,7 +86,7 @@ Functions
  • - Plots + Plots
  • FAQ @@ -119,13 +120,14 @@ +
    +
    + diff --git a/docs/articles/index.html b/docs/articles/index.html index 523dcfe2..6fb2cba8 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,13 +43,14 @@ - + + @@ -56,6 +61,7 @@ + @@ -72,7 +78,7 @@ xpose - 0.4.4 + 0.4.5 @@ -119,13 +125,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • -
    # Example with a string
    -dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'))
    +dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'))

    # Example with a formula
     dv_vs_ipred(xpdb, facets = SEX~MED1, margins = TRUE)
    @@ -159,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.

    +

    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)
    +p1 <- dv_vs_ipred(xpdb, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1)
     
     # Change the page to be drawn
    -print(p1, page = 2)
    +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'))
    +
    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)
    +dv_vs_ipred(xpdb_numbered, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1, page = 2)

    @@ -192,15 +194,16 @@

    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) %>% 
    +
    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) %>% 
    +
    dv_vs_ipred(xpdb_numbered, facets = c('SEX', 'MED1'), ncol = 2, nrow = 1) %>% 
     xpose_save(file = '@run_@plotfun_%03d.png')
    + 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 64607e07..77be1c82 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 b7908a3e..a2b9f93e 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 2f8d9a61..88702c9f 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 a7001523..dabedc30 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 2f8d9a61..88702c9f 100644 Binary files a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-3-1.png and b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-3-1.png differ diff --git a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-5-1.png index fbd78c3d..42503e7b 100644 Binary files a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/multiple_pages_files/figure-html/unnamed-chunk-6-1.png index f5f796aa..02a5b577 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/bestiarium.html b/docs/articles/plot_list.html similarity index 81% rename from docs/articles/bestiarium.html rename to docs/articles/plot_list.html index 9eb05215..55d5465c 100644 --- a/docs/articles/bestiarium.html +++ b/docs/articles/plot_list.html @@ -13,8 +13,9 @@ - - + + + @@ -38,7 +39,7 @@ xpose - 0.4.4 + 0.4.5 @@ -85,7 +86,7 @@ Functions
  • - Plots + Plots
  • FAQ @@ -119,16 +120,17 @@ +
    @@ -141,48 +143,48 @@

    Plots of the independent variable (IDV)

    dv_vs_idv(xpdb_ex_pk)
    -

    +

    ipred_vs_idv(xpdb_ex_pk)
    -

    +

    pred_vs_idv(xpdb_ex_pk)
    -

    +

    dv_preds_vs_idv(xpdb_ex_pk)
    -

    +

    DV vs. PREDs plots

    dv_vs_pred(xpdb_ex_pk)
    -

    +

    dv_vs_ipred(xpdb_ex_pk)
    -

    +

    Residual plots

    res_vs_idv(xpdb_ex_pk, res = 'CWRES')
    -

    +

    res_vs_pred(xpdb_ex_pk, res = 'CWRES')
    -

    +

    absval_res_vs_idv(xpdb_ex_pk, res = 'CWRES')
    -

    +

    absval_res_vs_pred(xpdb_ex_pk, res = 'CWRES')
    -

    +

    Minimization plots

    prm_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)
    -

    +

    @@ -191,25 +193,25 @@

    Histograms and density plots

    prm_distrib(xpdb_ex_pk)
    -

    +

    eta_distrib(xpdb_ex_pk)
    -

    +

    res_distrib(xpdb_ex_pk)
    -

    +

    cov_distrib(xpdb_ex_pk)
    -

    +

    QQ plots

    prm_qq(xpdb_ex_pk)
    -

    +

    eta_qq(xpdb_ex_pk)
    -

    +

    res_qq(xpdb_ex_pk)
    -

    +

    cov_qq(xpdb_ex_pk)
    -

    +

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

    Compartment’s amount

    amt_vs_idv(xpdb_ex_pk)
    -

    +

    @@ -231,7 +233,7 @@

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

    +

    @@ -240,7 +242,7 @@

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

    +

    @@ -253,6 +255,7 @@

    + 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 new file mode 100644 index 00000000..12b02f0f Binary files /dev/null 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 new file mode 100644 index 00000000..7122f8a6 Binary files /dev/null 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 new file mode 100644 index 00000000..05fb68d4 Binary files /dev/null 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 new file mode 100644 index 00000000..1954e334 Binary files /dev/null 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 new file mode 100644 index 00000000..59b54365 Binary files /dev/null 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 new file mode 100644 index 00000000..b794ebc7 Binary files /dev/null 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 new file mode 100644 index 00000000..bb138c6f Binary files /dev/null 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 new file mode 100644 index 00000000..02e719de Binary files /dev/null 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 new file mode 100644 index 00000000..0cf67cae Binary files /dev/null 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 new file mode 100644 index 00000000..e34cc0f5 Binary files /dev/null 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 new file mode 100644 index 00000000..e1065216 Binary files /dev/null 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 new file mode 100644 index 00000000..8323491f Binary files /dev/null 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 new file mode 100644 index 00000000..1f09a01f Binary files /dev/null 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 new file mode 100644 index 00000000..d7d3efa5 Binary files /dev/null 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 new file mode 100644 index 00000000..9f99200a Binary files /dev/null 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 new file mode 100644 index 00000000..bc22f0e4 Binary files /dev/null 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 new file mode 100644 index 00000000..ad8d02eb Binary files /dev/null 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 new file mode 100644 index 00000000..d0cdf4be Binary files /dev/null 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 new file mode 100644 index 00000000..29d2c401 Binary files /dev/null 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 new file mode 100644 index 00000000..c7ff2896 Binary files /dev/null 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 new file mode 100644 index 00000000..a437f39f Binary files /dev/null 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 new file mode 100644 index 00000000..cffcd901 Binary files /dev/null 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 new file mode 100644 index 00000000..14df17ec Binary files /dev/null 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 new file mode 100644 index 00000000..b34567c3 Binary files /dev/null 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 7f2c0c53..40afa176 100644 --- a/docs/articles/vpc.html +++ b/docs/articles/vpc.html @@ -13,8 +13,9 @@ - - + + + @@ -38,7 +39,7 @@ xpose - 0.4.4 + 0.4.5 @@ -85,7 +86,7 @@ Functions
  • - Plots + Plots
  • FAQ @@ -119,13 +120,14 @@ +
    +
    + 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 116a28e0..5a4cde6c 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 116a28e0..5a4cde6c 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 b6a96852..935e6e09 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 5de4e26c..c6dac0f5 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 b2db9ff8..93929677 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 116a28e0..5a4cde6c 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 09e00443..a62f99b0 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,13 +43,14 @@ - + + @@ -56,6 +61,7 @@ + @@ -72,7 +78,7 @@ xpose - 0.4.4 + 0.4.5 @@ -119,13 +125,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • -
    +

    Developers

      @@ -313,7 +315,7 @@

      Developers

    -
    +

    Dev status

    • travis_status
    • @@ -325,7 +327,6 @@

      Dev status

    - @@ -334,12 +335,14 @@

    Dev status

    -

    Site built with pkgdown 1.3.0.

    +

    Site built with pkgdown 1.4.1.

    + + diff --git a/docs/news/index.html b/docs/news/index.html index 4dc09d53..39858966 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,13 +43,14 @@ - + + @@ -56,6 +61,7 @@ + @@ -72,7 +78,7 @@ xpose - 0.4.4 + 0.4.5 @@ -119,13 +125,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • -

    • Improved documentation for xpose_data (@billdenney #99)
    • Fixed VPC error in the documentation (@callistosp #130)
    • @@ -180,9 +200,9 @@

      xpose 0.4.3 2018-07-28

      -
      +

      -General

      +General
      • Fixed bug in get_prm()/prm_table() where off diagonal correlations were improperly computed.
      • Fixed bug in print.xpose_data()where a warning from stringi was returned.
      • @@ -195,9 +215,9 @@

        xpose 0.4.2 2018-01-30

        -
        +

        -General

        +General
        • Address CRAN requests
        • Improved internal structure of VPC
        • @@ -209,19 +229,19 @@

          xpose 0.4.1 2018-01-09

          -
          +

          -General

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

          xpose 0.4.0 2017-11-17

          -
          +

          -General

          +General
          • Added xpdb memory usage to print.xpose_data()
          • @@ -279,9 +299,9 @@

            xpose 0.3.0 Unreleased

            -
            +

            -General

            +General
            • Improved documentation and testing
            • Improved compatibility with NONMEM 7.4.1
            • @@ -326,9 +346,9 @@

              xpose 0.2.0 Unreleased

              -
              +

              -General

              +General
              + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css index c03fb08d..91459581 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -21,8 +21,6 @@ body > .container { display: flex; height: 100%; flex-direction: column; - - padding-top: 60px; } body > .container .row { @@ -102,21 +100,13 @@ a.anchor { margin-top: -40px; } -/* Static header placement on mobile devices */ -@media (max-width: 767px) { - .navbar-fixed-top { - position: absolute; - } - .navbar { - padding: 0; - } -} - - /* Sidebar --------------------------*/ #sidebar { margin-top: 30px; + position: -webkit-sticky; + position: sticky; + top: 70px; } #sidebar h2 { font-size: 1.5em; @@ -133,6 +123,9 @@ a.anchor { .orcid { height: 16px; + /* margins are required by official ORCID trademark and display guidelines */ + margin-left:4px; + margin-right:4px; vertical-align: middle; } @@ -222,6 +215,19 @@ a.sourceLine:hover { visibility: visible; } +/* headroom.js ------------------------ */ + +.headroom { + will-change: transform; + transition: transform 200ms linear; +} +.headroom--pinned { + transform: translateY(0%); +} +.headroom--unpinned { + transform: translateY(-100%); +} + /* mark.js ----------------------------*/ mark { @@ -234,3 +240,17 @@ mark { .html-widget { margin-bottom: 10px; } + +/* fontawesome ------------------------ */ + +.fab { + font-family: "Font Awesome 5 Brands" !important; +} + +/* don't display links in code chunks when printing */ +/* source: https://stackoverflow.com/a/10781533 */ +@media print { + code a:link:after, code a:visited:after { + content: ""; + } +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index eb7e83d2..087a7622 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -2,14 +2,12 @@ (function($) { $(function() { - $("#sidebar") - .stick_in_parent({offset_top: 40}) - .on('sticky_kit:bottom', function(e) { - $(this).parent().css('position', 'static'); - }) - .on('sticky_kit:unbottom', function(e) { - $(this).parent().css('position', 'relative'); - }); + $('.navbar-fixed-top').headroom(); + + $('body').css('padding-top', $('.navbar').height() + 10); + $(window).resize(function(){ + $('body').css('padding-top', $('.navbar').height() + 10); + }); $('body').scrollspy({ target: '#sidebar', diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 649e3b1a..6b7ebb38 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,15 +1,15 @@ pandoc: 2.3.1 -pkgdown: 1.3.0 +pkgdown: 1.4.1 pkgdown_sha: ~ articles: about: about.html access_xpdb_data: access_xpdb_data.html - bestiarium: bestiarium.html customize_plots: customize_plots.html faq: faq.html import_model_outputs: import_model_outputs.html interactive_plots: interactive_plots.html introduction: introduction.html multiple_pages: multiple_pages.html + plot_list: plot_list.html vpc: vpc.html diff --git a/docs/reference/add_facet_var.html b/docs/reference/add_facet_var.html index 35217aa0..5d3c67b9 100644 --- a/docs/reference/add_facet_var.html +++ b/docs/reference/add_facet_var.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5
              @@ -121,13 +126,12 @@ Functions
            • - Plots + Plots
            • FAQ
            -
            +
            @@ -165,13 +170,11 @@

            Add faceting variable

            -

            Convenience function to add default faceting variable

            -
            add_facet_var(facets, variable = "variable")
            - +

            Arguments

            @@ -184,37 +187,39 @@

            Arg

            Default variable to be appended to variables in facets.

            - +

            Value

            facets as formula or character string.

            -
          +
          + + diff --git a/docs/reference/aes_c.html b/docs/reference/aes_c.html index c0812f4e..23b9a521 100644 --- a/docs/reference/aes_c.html +++ b/docs/reference/aes_c.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5
          @@ -121,13 +126,12 @@ Functions
        • - Plots + Plots
        • FAQ
        -
        +
        @@ -165,13 +170,11 @@

        Set new default value for ggplot2 aesthetics

        -

        Set new default value for ggplot2 aesthetics

        -
        aes_c(fun_aes, user_aes)
        - +

        Arguments

        @@ -185,37 +188,39 @@

        Arg aesthetics will overwrite matching elements in `fun_aes`.

        - +

        Value

        ggplot2 aesthetics mapping

        -
      + + + diff --git a/docs/reference/aes_filter.html b/docs/reference/aes_filter.html index a7e45dbd..8d23e629 100644 --- a/docs/reference/aes_filter.html +++ b/docs/reference/aes_filter.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
    • - Plots + Plots
    • FAQ
    - + + + diff --git a/docs/reference/aes_rename.html b/docs/reference/aes_rename.html index 0d348e4e..d0422618 100644 --- a/docs/reference/aes_rename.html +++ b/docs/reference/aes_rename.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/all_data_problem.html b/docs/reference/all_data_problem.html index c12de2e0..d8ad1bf1 100644 --- a/docs/reference/all_data_problem.html +++ b/docs/reference/all_data_problem.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/all_file_problem.html b/docs/reference/all_file_problem.html index c92fb2ee..21675601 100644 --- a/docs/reference/all_file_problem.html +++ b/docs/reference/all_file_problem.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/amt_vs_idv-1.png b/docs/reference/amt_vs_idv-1.png index c0081668..120e1be1 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 a3fbdf99..fb1fc4c5 100644 --- a/docs/reference/amt_vs_idv.html +++ b/docs/reference/amt_vs_idv.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - + + + diff --git a/docs/reference/as.nm.table.list.html b/docs/reference/as.nm.table.list.html index d56f9ddd..4c90d694 100644 --- a/docs/reference/as.nm.table.list.html +++ b/docs/reference/as.nm.table.list.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/as.xpdb.html b/docs/reference/as.xpdb.html index ef95068a..d708f812 100644 --- a/docs/reference/as.xpdb.html +++ b/docs/reference/as.xpdb.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/as.xpose.plot.html b/docs/reference/as.xpose.plot.html index 27cb5411..891c50dd 100644 --- a/docs/reference/as.xpose.plot.html +++ b/docs/reference/as.xpose.plot.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/as.xpose.theme.html b/docs/reference/as.xpose.theme.html index 8bbc04e2..a6136a30 100644 --- a/docs/reference/as.xpose.theme.html +++ b/docs/reference/as.xpose.theme.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/check_plot_type.html b/docs/reference/check_plot_type.html index c22a48ff..b92f14c9 100644 --- a/docs/reference/check_plot_type.html +++ b/docs/reference/check_plot_type.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/check_problem.html b/docs/reference/check_problem.html index d188ad1c..9f9933e4 100644 --- a/docs/reference/check_problem.html +++ b/docs/reference/check_problem.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/check_quo_vars.html b/docs/reference/check_quo_vars.html index 4c7935e7..32837a2d 100644 --- a/docs/reference/check_quo_vars.html +++ b/docs/reference/check_quo_vars.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,16 +43,16 @@ - + - + @@ -59,6 +63,7 @@ + @@ -75,7 +80,7 @@ xpose - 0.4.4 + 0.4.5 @@ -122,13 +127,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/check_scales.html b/docs/reference/check_scales.html index d0d3957b..ec2abaa5 100644 --- a/docs/reference/check_scales.html +++ b/docs/reference/check_scales.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/check_xpdb.html b/docs/reference/check_xpdb.html index e3e0a796..64f18004 100644 --- a/docs/reference/check_xpdb.html +++ b/docs/reference/check_xpdb.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/combine_tables.html b/docs/reference/combine_tables.html index ede6fa44..8602c2ea 100644 --- a/docs/reference/combine_tables.html +++ b/docs/reference/combine_tables.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/data_opt.html b/docs/reference/data_opt.html index 90e37494..88aa2449 100644 --- a/docs/reference/data_opt.html +++ b/docs/reference/data_opt.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,16 +43,16 @@ - + - + @@ -59,6 +63,7 @@ + @@ -75,7 +80,7 @@ xpose - 0.4.4 + 0.4.5 @@ -122,13 +127,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - + + + diff --git a/docs/reference/distrib_plot-1.png b/docs/reference/distrib_plot-1.png index 4bf3732e..5afdda9a 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 f9c72182..33fbc152 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 7de7891e..348caa4c 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 83dda8de..2ed17c92 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 0a567f50..dfaf0b91 100644 --- a/docs/reference/distrib_plot.html +++ b/docs/reference/distrib_plot.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - - + + + diff --git a/docs/reference/figures/readme_example_figure_1-1-2018-09-02_21-37-32-814.png b/docs/reference/figures/readme_example_figure_1-1-2018-09-02_21-37-32-814.png deleted file mode 100755 index 884a09e2..00000000 Binary files a/docs/reference/figures/readme_example_figure_1-1-2018-09-02_21-37-32-814.png and /dev/null differ diff --git a/docs/reference/figures/readme_example_figure_1-1.png b/docs/reference/figures/readme_example_figure_1-1.png index fb77e22d..f44f3382 100644 Binary files a/docs/reference/figures/readme_example_figure_1-1.png and b/docs/reference/figures/readme_example_figure_1-1.png differ diff --git a/docs/reference/figures/readme_example_figure_2-1-2018-09-02_21-37-32-374.png b/docs/reference/figures/readme_example_figure_2-1-2018-09-02_21-37-32-374.png deleted file mode 100755 index 98f6d69b..00000000 Binary files a/docs/reference/figures/readme_example_figure_2-1-2018-09-02_21-37-32-374.png and /dev/null differ diff --git a/docs/reference/figures/readme_example_figure_2-1.png b/docs/reference/figures/readme_example_figure_2-1.png index 60c54755..ffdc0d8d 100644 Binary files a/docs/reference/figures/readme_example_figure_2-1.png and b/docs/reference/figures/readme_example_figure_2-1.png differ diff --git a/docs/reference/figures/readme_example_figure_3-1.png b/docs/reference/figures/readme_example_figure_3-1.png index 2380cfca..41eb6ccb 100644 Binary files a/docs/reference/figures/readme_example_figure_3-1.png and b/docs/reference/figures/readme_example_figure_3-1.png differ diff --git a/docs/reference/figures/readme_example_figure_4-1.png b/docs/reference/figures/readme_example_figure_4-1.png index 04a0b8c8..385b2402 100644 Binary files a/docs/reference/figures/readme_example_figure_4-1.png and b/docs/reference/figures/readme_example_figure_4-1.png differ diff --git a/docs/reference/figures/readme_example_figure_5-1.png b/docs/reference/figures/readme_example_figure_5-1.png index ab1b6950..a430f120 100644 Binary files a/docs/reference/figures/readme_example_figure_5-1.png and b/docs/reference/figures/readme_example_figure_5-1.png differ diff --git a/docs/reference/file_path.html b/docs/reference/file_path.html index 528b6a4c..fe0c8100 100644 --- a/docs/reference/file_path.html +++ b/docs/reference/file_path.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,16 +43,16 @@ - + - + @@ -59,6 +63,7 @@ + @@ -75,7 +80,7 @@ xpose - 0.4.4 + 0.4.5 @@ -122,13 +127,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/filter_xp_theme.html b/docs/reference/filter_xp_theme.html index 50f0b508..cc4b305e 100644 --- a/docs/reference/filter_xp_theme.html +++ b/docs/reference/filter_xp_theme.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/get_code.html b/docs/reference/get_code.html index 0e3be3cb..db43bbda 100644 --- a/docs/reference/get_code.html +++ b/docs/reference/get_code.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - - + + + diff --git a/docs/reference/get_file.html b/docs/reference/get_file.html index 928e1e54..e6cc9485 100644 --- a/docs/reference/get_file.html +++ b/docs/reference/get_file.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - - + + + diff --git a/docs/reference/get_special.html b/docs/reference/get_special.html index 52673221..d3df651d 100644 --- a/docs/reference/get_special.html +++ b/docs/reference/get_special.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - - - +
    theme_bw2(base_size = 11, base_family = "",
    @@ -189,7 +194,7 @@ 

    An additional set of themes for ggplot2

    theme_readable(base_size = 11, base_family = "", legend_position = "right")
    - +

    Arguments

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

    Arg 'right', 'bottom', 'top', or a two-element numeric vector.

    - +

    Examples

    # With the gg_theme theme_readable() (default) @@ -222,26 +227,29 @@

    Examp

    Contents

    + + + diff --git a/docs/reference/grab_iter.html b/docs/reference/grab_iter.html index f81ea011..a916799d 100644 --- a/docs/reference/grab_iter.html +++ b/docs/reference/grab_iter.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/ind_plots-1.png b/docs/reference/ind_plots-1.png index ddd00cdf..69d4a862 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 9b74a2fb..04261a05 100644 --- a/docs/reference/ind_plots.html +++ b/docs/reference/ind_plots.html @@ -16,21 +16,25 @@ + + - + + - - + + + @@ -40,17 +44,17 @@ + - - + @@ -61,6 +65,7 @@ + @@ -77,7 +82,7 @@ xpose - 0.4.4 + 0.4.5 @@ -124,13 +129,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • -
    +

    Arguments

    @@ -260,11 +263,12 @@

    Arg

    Any additional aesthetics to be passed on xplot_scatter.

    - +

    Layers mapping

    -

    Plots can be customized by mapping arguments to specific layers. The naming convention is + +

    Plots can be customized by mapping arguments to specific layers. The naming convention is layer_option where layer is one of the names defined in the list below and option is any option supported by this layer e.g. point_color = 'blue', smooth_method = 'lm', etc.

    • point: options to geom_point

    • @@ -275,11 +279,12 @@

      Faceting

      -

      Every xpose plot function has built-in faceting functionalities. Faceting arguments + +

      Every xpose plot function has built-in faceting functionalities. Faceting arguments are passed to the functions facet_wrap_paginate when the facets argument is a character string (e.g. facets = c('SEX', 'MED1')) or facet_grid_paginate when facets is a formula (e.g. facets = SEX~MED1). @@ -294,22 +299,20 @@

      Facet eta_distrib(). When using the facets argument, `variable` needs to be added manually e.g. facets = c('SEX', 'variable') or facets = c('SEX', 'variable'), but is optional, when using the facets argument in xp_theme variable is automatically added whenever needed.

      -

      Template titles

      -

      Template titles can be used to create highly informative diagnostics plots. + +

      Template titles can be used to create highly informative diagnostics plots. They can be applied to any plot title, subtitle, caption and tag. Template titles are defined via a single string containing key variables staring 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'`. The available key variables are listed under template_titles.

      -

      See also

      -

      Examples

      # Basic example @@ -321,34 +324,33 @@

      Examp

      Contents

      + + + diff --git a/docs/reference/index.html b/docs/reference/index.html index 63effa4d..8fcd497b 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,13 +43,14 @@ - + + @@ -56,6 +61,7 @@ + @@ -72,7 +78,7 @@ xpose - 0.4.4 + 0.4.5 @@ -119,13 +125,12 @@ Functions
    • - Plots + Plots
    • FAQ
    -
    - + + + diff --git a/docs/reference/irep.html b/docs/reference/irep.html index d6008a55..8ef0c1ca 100644 --- a/docs/reference/irep.html +++ b/docs/reference/irep.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,16 +43,16 @@ - + - + @@ -59,6 +63,7 @@ + @@ -75,7 +80,7 @@ xpose - 0.4.4 + 0.4.5 @@ -122,13 +127,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - + + + diff --git a/docs/reference/is.nm.model.html b/docs/reference/is.nm.model.html index 5b30221e..6ccfa1af 100644 --- a/docs/reference/is.nm.model.html +++ b/docs/reference/is.nm.model.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/is.nm.table.list.html b/docs/reference/is.nm.table.list.html index e9803cff..99ccd89c 100644 --- a/docs/reference/is.nm.table.list.html +++ b/docs/reference/is.nm.table.list.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/is.xpdb.html b/docs/reference/is.xpdb.html index 0a60c768..15d0c0a6 100644 --- a/docs/reference/is.xpdb.html +++ b/docs/reference/is.xpdb.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/is.xpose.plot.html b/docs/reference/is.xpose.plot.html index e1567cc8..8f5d7273 100644 --- a/docs/reference/is.xpose.plot.html +++ b/docs/reference/is.xpose.plot.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/is.xpose.theme.html b/docs/reference/is.xpose.theme.html index 5326dad5..58152d10 100644 --- a/docs/reference/is.xpose.theme.html +++ b/docs/reference/is.xpose.theme.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/last_data_problem.html b/docs/reference/last_data_problem.html index 56c2d956..8a1f6212 100644 --- a/docs/reference/last_data_problem.html +++ b/docs/reference/last_data_problem.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,16 +43,16 @@ - + - + @@ -59,6 +63,7 @@ + @@ -75,7 +80,7 @@ xpose - 0.4.4 + 0.4.5 @@ -122,13 +127,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/last_file_method.html b/docs/reference/last_file_method.html index 01730dba..3360ba25 100644 --- a/docs/reference/last_file_method.html +++ b/docs/reference/last_file_method.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/last_file_problem.html b/docs/reference/last_file_problem.html index f8034e6a..cd8b07e1 100644 --- a/docs/reference/last_file_problem.html +++ b/docs/reference/last_file_problem.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/last_file_subprob.html b/docs/reference/last_file_subprob.html index 7145aeff..80f824f3 100644 --- a/docs/reference/last_file_subprob.html +++ b/docs/reference/last_file_subprob.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/list_nm_tables.html b/docs/reference/list_nm_tables.html index 52bb3c4d..a1fbeb6d 100644 --- a/docs/reference/list_nm_tables.html +++ b/docs/reference/list_nm_tables.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - + + + diff --git a/docs/reference/list_vars.html b/docs/reference/list_vars.html index f9bffa19..e4ced461 100644 --- a/docs/reference/list_vars.html +++ b/docs/reference/list_vars.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - - + + + diff --git a/docs/reference/manual_nm_import.html b/docs/reference/manual_nm_import.html index 6d824404..730ea01e 100644 --- a/docs/reference/manual_nm_import.html +++ b/docs/reference/manual_nm_import.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - + + + diff --git a/docs/reference/minimization_plots-1.png b/docs/reference/minimization_plots-1.png index 4c8fcc85..22f66ffb 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 9d2b7d64..eee8fd56 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 cb17fe42..e5faaf94 100644 --- a/docs/reference/minimization_plots.html +++ b/docs/reference/minimization_plots.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - + + + diff --git a/docs/reference/only_obs.html b/docs/reference/only_obs.html index f17fb700..064e4441 100644 --- a/docs/reference/only_obs.html +++ b/docs/reference/only_obs.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,16 +43,16 @@ - + - + @@ -59,6 +63,7 @@ + @@ -75,7 +80,7 @@ xpose - 0.4.4 + 0.4.5 @@ -122,13 +127,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/parse_arg.html b/docs/reference/parse_arg.html index 88a97871..9f77c223 100644 --- a/docs/reference/parse_arg.html +++ b/docs/reference/parse_arg.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,16 +43,16 @@ - + - + @@ -59,6 +63,7 @@ + @@ -75,7 +80,7 @@ xpose - 0.4.4 + 0.4.5 @@ -122,13 +127,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/parse_nm_files.html b/docs/reference/parse_nm_files.html index 415bbe2f..92d34fa8 100644 --- a/docs/reference/parse_nm_files.html +++ b/docs/reference/parse_nm_files.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,16 +43,16 @@ - + - + @@ -59,6 +63,7 @@ + @@ -75,7 +80,7 @@ xpose - 0.4.4 + 0.4.5 @@ -122,13 +127,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/parse_title.html b/docs/reference/parse_title.html index dcb02746..c021a028 100644 --- a/docs/reference/parse_title.html +++ b/docs/reference/parse_title.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/pred_vs_idv-1.png b/docs/reference/pred_vs_idv-1.png index fb8b0d2a..335e552a 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 8bda559f..9f5f4757 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 ee61d108..295071aa 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 ac9d10c5..d5ee3739 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 050f36ae..ec5b3e4e 100644 --- a/docs/reference/pred_vs_idv.html +++ b/docs/reference/pred_vs_idv.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,16 +43,16 @@ - + - + @@ -59,6 +63,7 @@ + @@ -75,7 +80,7 @@ xpose - 0.4.4 + 0.4.5 @@ -122,13 +127,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - + + + diff --git a/docs/reference/read_nm_files.html b/docs/reference/read_nm_files.html index e1e138c4..74e2a319 100644 --- a/docs/reference/read_nm_files.html +++ b/docs/reference/read_nm_files.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - - - - + + + diff --git a/docs/reference/xp_themes-1.png b/docs/reference/xp_themes-1.png index 5f39e32e..aa1040c4 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 213fe1ca..9b64ad08 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 02af891a..ac1b8ece 100644 --- a/docs/reference/xp_themes.html +++ b/docs/reference/xp_themes.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,21 +43,22 @@ - + +" /> + @@ -64,6 +69,7 @@ + @@ -80,7 +86,7 @@ xpose - 0.4.4 + 0.4.5 @@ -127,13 +133,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - +
    theme_xp_default()
     
     theme_xp_xpose4()
    - + +

    Examples

    # With the xp_theme theme_xp_default() (default) @@ -199,26 +205,29 @@

    Examp

    + + + diff --git a/docs/reference/xp_var.html b/docs/reference/xp_var.html index 0f23066e..36fb211c 100644 --- a/docs/reference/xp_var.html +++ b/docs/reference/xp_var.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - + + + diff --git a/docs/reference/xpdb_ex_pk.html b/docs/reference/xpdb_ex_pk.html index 67ae02f5..b6eec856 100644 --- a/docs/reference/xpdb_ex_pk.html +++ b/docs/reference/xpdb_ex_pk.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • - - + + + diff --git a/docs/reference/xplot_distrib-1.png b/docs/reference/xplot_distrib-1.png index 62685d14..89c73bdb 100644 Binary files a/docs/reference/xplot_distrib-1.png and b/docs/reference/xplot_distrib-1.png differ diff --git a/docs/reference/xplot_distrib-2.png b/docs/reference/xplot_distrib-2.png index 95c65c5f..ff53c216 100644 Binary files a/docs/reference/xplot_distrib-2.png and b/docs/reference/xplot_distrib-2.png differ diff --git a/docs/reference/xplot_distrib.html b/docs/reference/xplot_distrib.html index 01dde39e..70ea3252 100644 --- a/docs/reference/xplot_distrib.html +++ b/docs/reference/xplot_distrib.html @@ -15,21 +15,25 @@ + + - + + - - + + + @@ -39,15 +43,15 @@ - + - + @@ -58,6 +62,7 @@ + @@ -74,7 +79,7 @@ xpose - 0.4.4 + 0.4.5 @@ -121,13 +126,12 @@ Functions
  • - Plots + Plots
  • FAQ
  • -