diff --git a/DESCRIPTION b/DESCRIPTION index 7eb429dc..5e379f88 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,93 +1,93 @@ -Package: tlf -Type: Package -Title: TLF Library -Version: 1.3.0 -Authors@R: - c(person(given = "Open-Systems-Pharmacology Community", - role = "cph"), - person(given = "Michael", - family = "Sevestre", - role = c("aut", "cre"), - email = "michael@design2code.ca"), - person(given = "Pierre", - family = "Chelle", - role = "aut", - email = "chelle.pierre@gmail.com"), - person(given = "Abdullah", - family = "Hamadeh", - role = "aut", - email = "aoh123@gmail.com")) -Description: An implementation of the Table, Listing and Figure concepts in R. This library provides - a standardized approach to creating tables and graphs based on conventions over configurations. -License: GPL-2 | file LICENSE -URL: https://github.com/open-systems-pharmacology/tlf-library -BugReports: https://github.com/open-systems-pharmacology/tlf-library/issues -Imports: - ggplot2 (>= 3.3.0), - R6, - jsonlite, - ospsuite.utils, - patchwork -Depends: - R (>= 3.6) -Encoding: UTF-8 -RoxygenNote: 7.1.2 -Roxygen: list(markdown = TRUE) -Suggests: - knitr, - rmarkdown, - testthat (>= 2.1.0) -VignetteBuilder: knitr -Collate: - 'aaa-utilities.R' - 'aggregation-input.R' - 'aggregation-summary.R' - 'atom-plots.R' - 'boxwhisker-datamapping.R' - 'boxwhisker-get-measure.R' - 'boxwhisker-plotconfiguration.R' - 'datamapping-grouping.R' - 'datamapping-groupmapping.R' - 'datamapping-range.R' - 'datamapping-xy.R' - 'datamapping-xygroup.R' - 'ddiratio-datamapping.R' - 'error-checks.R' - 'font.R' - 'histogram-datamapping.R' - 'label.R' - 'messages.R' - 'obs-vs-pred-datamapping.R' - 'observed-data-mapping.R' - 'pkratio-datamapping.R' - 'pkratio-get-measure.R' - 'plot-boxwhisker.R' - 'plot-ddiratio.R' - 'plot-grid.R' - 'plot-histogram.R' - 'plot-obs-vs-pred.R' - 'plot-pkratio.R' - 'plot-res-vs-pred.R' - 'plot-timeprofile.R' - 'plot-tornado.R' - 'plotconfiguration-axis.R' - 'plotconfiguration-background.R' - 'plotconfiguration-export.R' - 'plotconfiguration-label.R' - 'plotconfiguration-legend.R' - 'plotconfiguration.R' - 'themes.R' - 'timeprofile-datamapping.R' - 'timeprofile-helper.R' - 'tlf-env.R' - 'tornado-datamapping.R' - 'tornado-plotconfiguration.R' - 'utilities-aesthetics.R' - 'utilities-axis.R' - 'utilities-background.R' - 'utilities-export.R' - 'utilities-label.R' - 'utilities-legend.R' - 'utilities-mapping.R' - 'utilities-theme.R' - 'utils.R' +Package: tlf +Type: Package +Title: TLF Library +Version: 1.3.0 +Authors@R: + c(person(given = "Open-Systems-Pharmacology Community", + role = "cph"), + person(given = "Michael", + family = "Sevestre", + role = c("aut", "cre"), + email = "michael@design2code.ca"), + person(given = "Pierre", + family = "Chelle", + role = "aut", + email = "chelle.pierre@gmail.com"), + person(given = "Abdullah", + family = "Hamadeh", + role = "aut", + email = "aoh123@gmail.com")) +Description: An implementation of the Table, Listing and Figure concepts in R. This library provides + a standardized approach to creating tables and graphs based on conventions over configurations. +License: GPL-2 | file LICENSE +URL: https://github.com/open-systems-pharmacology/tlf-library +BugReports: https://github.com/open-systems-pharmacology/tlf-library/issues +Imports: + ggplot2 (>= 3.3.0), + R6, + jsonlite, + ospsuite.utils, + patchwork +Depends: + R (>= 3.6) +Encoding: UTF-8 +RoxygenNote: 7.2.0 +Roxygen: list(markdown = TRUE) +Suggests: + knitr, + rmarkdown, + testthat (>= 2.1.0) +VignetteBuilder: knitr +Collate: + 'aaa-utilities.R' + 'aggregation-input.R' + 'aggregation-summary.R' + 'atom-plots.R' + 'boxwhisker-datamapping.R' + 'boxwhisker-get-measure.R' + 'boxwhisker-plotconfiguration.R' + 'datamapping-grouping.R' + 'datamapping-groupmapping.R' + 'datamapping-range.R' + 'datamapping-xy.R' + 'datamapping-xygroup.R' + 'ddiratio-datamapping.R' + 'error-checks.R' + 'font.R' + 'histogram-datamapping.R' + 'label.R' + 'messages.R' + 'obs-vs-pred-datamapping.R' + 'observed-data-mapping.R' + 'pkratio-datamapping.R' + 'pkratio-get-measure.R' + 'plot-boxwhisker.R' + 'plot-ddiratio.R' + 'plot-grid.R' + 'plot-histogram.R' + 'plot-obs-vs-pred.R' + 'plot-pkratio.R' + 'plot-res-vs-pred.R' + 'plot-timeprofile.R' + 'plot-tornado.R' + 'plotconfiguration-axis.R' + 'plotconfiguration-background.R' + 'plotconfiguration-export.R' + 'plotconfiguration-label.R' + 'plotconfiguration-legend.R' + 'plotconfiguration.R' + 'themes.R' + 'timeprofile-datamapping.R' + 'timeprofile-helper.R' + 'tlf-env.R' + 'tornado-datamapping.R' + 'tornado-plotconfiguration.R' + 'utilities-aesthetics.R' + 'utilities-axis.R' + 'utilities-background.R' + 'utilities-export.R' + 'utilities-label.R' + 'utilities-legend.R' + 'utilities-mapping.R' + 'utilities-theme.R' + 'utils.R' diff --git a/R/aggregation-input.R b/R/aggregation-input.R index 93d42943..449dff35 100644 --- a/R/aggregation-input.R +++ b/R/aggregation-input.R @@ -59,10 +59,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `mean(x)-1.96*sd(x)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate mean-1.96SD #' `mean-1.96sd`(rnorm(1000)) -#' +#' `mean-1.96sd` <- function(x) { return(mean(x) - 1.96 * stats::sd(x)) } @@ -73,10 +73,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `mean(x)+1.96*sd(x)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate mean+1.96SD #' `mean+1.96sd`(rnorm(1000)) -#' +#' `mean+1.96sd` <- function(x) { return(mean(x) + 1.96 * stats::sd(x)) } @@ -87,10 +87,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `mean(x)-sd(x)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate mean-SD #' `mean-sd`(rnorm(1000)) -#' +#' `mean-sd` <- function(x) { return(mean(x) - stats::sd(x)) } @@ -101,10 +101,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `mean(x)+sd(x)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate mean-SD #' `mean+sd`(rnorm(1000)) -#' +#' `mean+sd` <- function(x) { return(mean(x) + stats::sd(x)) } @@ -115,10 +115,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `median(x)-iqr(x)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate median-IQR #' `median-IQR`(rnorm(1000)) -#' +#' `median-IQR` <- function(x) { quartiles <- stats::quantile(x, probs = c(0.5, 0.75, 0.25)) res <- quartiles[1] - (quartiles[2] - quartiles[3]) @@ -131,10 +131,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `median(x)+iqr(x)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate median+IQR #' `median+IQR`(rnorm(1000)) -#' +#' `median+IQR` <- function(x) { quartiles <- stats::quantile(x, probs = c(0.5, 0.75, 0.25)) res <- quartiles[1] + (quartiles[2] - quartiles[3]) @@ -147,10 +147,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `median(x)-1.5*iqr(x)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate median-1.5IQR #' `median-1.5IQR`(rnorm(1000)) -#' +#' `median-1.5IQR` <- function(x) { quartiles <- stats::quantile(x, probs = c(0.5, 0.75, 0.25)) res <- quartiles[1] - 1.5 * (quartiles[2] - quartiles[3]) @@ -163,10 +163,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `median(x)+1.5*iqr(x)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate median+1.5IQR #' `median+1.5IQR`(rnorm(1000)) -#' +#' `median+1.5IQR` <- function(x) { quartiles <- stats::quantile(x, probs = c(0.5, 0.75, 0.25)) res <- quartiles[1] + 1.5 * (quartiles[2] - quartiles[3]) @@ -179,10 +179,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 0.25)-1.5*iqr(x)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile25%-1.5IQR #' `Percentile25%-1.5IQR`(rnorm(1000)) -#' +#' `Percentile25%-1.5IQR` <- function(x) { quartiles <- stats::quantile(x, probs = c(0.75, 0.25)) res <- quartiles[2] - 1.5 * (quartiles[1] - quartiles[2]) @@ -195,10 +195,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 0.75)+1.5*iqr(x)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile75%+1.5IQR #' `Percentile75%+1.5IQR`(rnorm(1000)) -#' +#' `Percentile75%+1.5IQR` <- function(x) { quartiles <- stats::quantile(x, probs = c(0.75, 0.25)) res <- quartiles[1] + 1.5 * (quartiles[1] - quartiles[2]) @@ -220,10 +220,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 0)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile0% #' `Percentile0%`(rnorm(1000)) -#' +#' `Percentile0%` <- function(x) { as.numeric(stats::quantile(x, probs = 0)) } @@ -234,10 +234,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 1/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile1% #' `Percentile1%`(rnorm(1000)) -#' +#' `Percentile1%` <- function(x) { as.numeric(stats::quantile(x, probs = 1 / 100)) } @@ -248,10 +248,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 2.5/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile2.5% #' `Percentile2.5%`(rnorm(1000)) -#' +#' `Percentile2.5%` <- function(x) { as.numeric(stats::quantile(x, probs = 2.5 / 100)) } @@ -262,10 +262,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 5/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile5% #' `Percentile5%`(rnorm(1000)) -#' +#' `Percentile5%` <- function(x) { as.numeric(stats::quantile(x, probs = 5 / 100)) } @@ -276,10 +276,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 10/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile10% #' `Percentile10%`(rnorm(1000)) -#' +#' `Percentile10%` <- function(x) { as.numeric(stats::quantile(x, probs = 10 / 100)) } @@ -290,10 +290,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 15/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile15% #' `Percentile15%`(rnorm(1000)) -#' +#' `Percentile15%` <- function(x) { as.numeric(stats::quantile(x, probs = 15 / 100)) } @@ -304,10 +304,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 20/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile20% #' `Percentile20%`(rnorm(1000)) -#' +#' `Percentile20%` <- function(x) { as.numeric(stats::quantile(x, probs = 20 / 100)) } @@ -318,10 +318,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 25/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile25% #' `Percentile25%`(rnorm(1000)) -#' +#' `Percentile25%` <- function(x) { as.numeric(stats::quantile(x, probs = 25 / 100)) } @@ -332,10 +332,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 50/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile50% #' `Percentile50%`(rnorm(1000)) -#' +#' `Percentile50%` <- function(x) { as.numeric(stats::quantile(x, probs = 50 / 100)) } @@ -346,10 +346,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 75/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile75% #' `Percentile75%`(rnorm(1000)) -#' +#' `Percentile75%` <- function(x) { as.numeric(stats::quantile(x, probs = 75 / 100)) } @@ -360,10 +360,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 80/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile80% #' `Percentile80%`(rnorm(1000)) -#' +#' `Percentile80%` <- function(x) { as.numeric(stats::quantile(x, probs = 80 / 100)) } @@ -374,10 +374,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 85/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile85% #' `Percentile85%`(rnorm(1000)) -#' +#' `Percentile85%` <- function(x) { as.numeric(stats::quantile(x, probs = 85 / 100)) } @@ -388,10 +388,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 90/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile90% #' `Percentile90%`(rnorm(1000)) -#' +#' `Percentile90%` <- function(x) { as.numeric(stats::quantile(x, probs = 90 / 100)) } @@ -402,10 +402,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 95/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile95% #' `Percentile95%`(rnorm(1000)) -#' +#' `Percentile95%` <- function(x) { as.numeric(stats::quantile(x, probs = 95 / 100)) } @@ -416,10 +416,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 97.5/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile97.5% #' `Percentile97.5%`(rnorm(1000)) -#' +#' `Percentile97.5%` <- function(x) { as.numeric(stats::quantile(x, probs = 97.5 / 100)) } @@ -430,10 +430,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 99/100)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile99% #' `Percentile99%`(rnorm(1000)) -#' +#' `Percentile99%` <- function(x) { as.numeric(stats::quantile(x, probs = 99 / 100)) } @@ -444,10 +444,10 @@ tlfStatFunctions <- enum(c( #' @return Numeric value corresponding to `quantile(x, 1)` #' @export #' @family stat functions -#' @examples +#' @examples #' # Calculate Percentile100% #' `Percentile100%`(rnorm(1000)) -#' +#' `Percentile100%` <- function(x) { as.numeric(stats::quantile(x, probs = 1)) } diff --git a/R/atom-plots.R b/R/atom-plots.R index 19e4e28a..41a9d41a 100644 --- a/R/atom-plots.R +++ b/R/atom-plots.R @@ -3,15 +3,15 @@ #' @title initializePlot #' @description #' Initialize a `ggplot` object and set its labels, grid, background and watermark -#' +#' #' @param plotConfiguration #' An optional `PlotConfiguration` object defining labels, grid, background and watermark -#' +#' #' @return A `ggplot` graphical object -#' +#' #' @references For examples, see: #' -#' +#' #' @family atom plots #' @export #' @import ospsuite.utils @@ -22,7 +22,7 @@ #' # Implement a customized configuration using PlotConfiguration #' config <- PlotConfiguration$new(title = "My Plot", xlabel = "x variable", ylabel = "y variable") #' p <- initializePlot(config) -#' +#' initializePlot <- function(plotConfiguration = NULL) { validateIsOfType(plotConfiguration, "PlotConfiguration", nullAllowed = TRUE) plotConfiguration <- plotConfiguration %||% PlotConfiguration$new() @@ -44,7 +44,7 @@ initializePlot <- function(plotConfiguration = NULL) { #' @title addScatter #' @description #' Add a scatter plot layer to a `ggplot` object -#' +#' #' @param data A data.frame to use for plot. #' @param metaData A named list of information about `data` such as the `dimension` and `unit` of its variables. #' @param x Numeric values to plot along the `x` axis. Only used instead of `data` if `data` is `NULL`. @@ -58,14 +58,14 @@ initializePlot <- function(plotConfiguration = NULL) { #' @param linetype Optional character values defining the linetype of the plot layer. #' See enum `Linetypes` to get names of linetype. #' @param size Optional numeric values defining the size of the plot layer. -#' @param plotConfiguration +#' @param plotConfiguration #' An optional `PlotConfiguration` object defining labels, grid, background and watermark. -#' @param plotObject +#' @param plotObject #' An optional `ggplot` object on which to add the plot layer #' @return A `ggplot` object #' @references For examples, see: #' -#' +#' #' @family atom plots #' @export #' @examples @@ -89,21 +89,21 @@ initializePlot <- function(plotConfiguration = NULL) { #' #' # Add a scatter with specific properties #' addScatter( -#' data = scatterData, -#' color = "blue", shape = "diamond", size = 2, caption = "My data" +#' data = scatterData, +#' color = "blue", shape = "diamond", size = 2, caption = "My data" #' ) #' #' # Add a scatter with specific properties #' p <- addScatter( -#' data = scatterData, -#' color = "blue", shape = "diamond", size = 2, caption = "My data" +#' data = scatterData, +#' color = "blue", shape = "diamond", size = 2, caption = "My data" #' ) #' addScatter( -#' x = c(0, 1), y = c(1, 0), -#' color = "red", shape = "circle", size = 3, -#' plotObject = p +#' x = c(0, 1), y = c(1, 0), +#' color = "red", shape = "circle", size = 3, +#' plotObject = p #' ) -#' +#' addScatter <- function(data = NULL, metaData = NULL, x = NULL, @@ -192,11 +192,11 @@ addScatter <- function(data = NULL, #' @inheritParams addScatter #' @description #' Add a line layer to a `ggplot` object. -#' +#' #' @return A `ggplot` object #' @references For examples, see: #' -#' +#' #' @family atom plots #' @export #' @examples @@ -220,21 +220,21 @@ addScatter <- function(data = NULL, #' #' # Add a line with specific properties #' addLine( -#' data = lineData, -#' color = "blue", linetype = "longdash", size = 0.5, caption = "My data" +#' data = lineData, +#' color = "blue", linetype = "longdash", size = 0.5, caption = "My data" #' ) #' #' # Add a line with specific properties #' p <- addLine( -#' data = lineData, -#' color = "blue", linetype = "longdash", size = 0.5, caption = "My data" +#' data = lineData, +#' color = "blue", linetype = "longdash", size = 0.5, caption = "My data" #' ) #' addLine( -#' x = c(0, 1), y = c(1, 0), -#' color = "red", linetype = "solid", size = 1, -#' plotObject = p +#' x = c(0, 1), y = c(1, 0), +#' color = "red", linetype = "solid", size = 1, +#' plotObject = p #' ) -#' +#' addLine <- function(data = NULL, metaData = NULL, x = NULL, @@ -369,7 +369,7 @@ addLine <- function(data = NULL, #' @title addRibbon #' @description #' Add a ribbon layer to a `ggplot` object. -#' +#' #' @inheritParams addScatter #' @param ymin Numeric values to plot along the `y` axis. Only used instead of `data` if `data` is `NULL`. #' @param ymax Numeric values to plot along the `y` axis. Only used instead of `data` if `data` is `NULL`. @@ -382,20 +382,20 @@ addLine <- function(data = NULL, #' @return A `ggplot` object #' @references For examples, see: #' -#' +#' #' @family atom plots #' @export #' @examples #' # Add ribbon using x, ymin and ymax #' addRibbon( -#' x = c(1, 2, 1, 2, 3), -#' ymin = c(5, 0, 2, 3, 4), -#' ymax = c(6, 2, 6, 2.5, 5) +#' x = c(1, 2, 1, 2, 3), +#' ymin = c(5, 0, 2, 3, 4), +#' ymax = c(6, 2, 6, 2.5, 5) #' ) #' #' # Add ribbon using a data.frame #' time <- seq(0, 30, 0.1) -#' ribbonData <- data.frame(x = time, ymin = cos(time)-1, ymax = cos(time)+1) +#' ribbonData <- data.frame(x = time, ymin = cos(time) - 1, ymax = cos(time) + 1) #' #' addRibbon( #' data = ribbonData, @@ -414,11 +414,11 @@ addLine <- function(data = NULL, #' # Add a ribbon with specific properties #' p <- addRibbon(data = ribbonData, fill = "blue", alpha = 0.5, caption = "My data") #' addRibbon( -#' x = c(0, 1), ymin = c(-0.5, -0.5), ymax = c(0.5, 0.5), -#' fill = "red", alpha = 1, -#' plotObject = p +#' x = c(0, 1), ymin = c(-0.5, -0.5), ymax = c(0.5, 0.5), +#' fill = "red", alpha = 1, +#' plotObject = p #' ) -#' +#' addRibbon <- function(data = NULL, metaData = NULL, x = NULL, @@ -502,27 +502,27 @@ addRibbon <- function(data = NULL, #' @title addErrorbar #' @description #' Add an errorbar layer to a `ggplot` object. -#' +#' #' @inheritParams addRibbon #' @inheritParams addScatter #' @param includeCap Logical defining if errorbars include caps at their ends. #' @return A `ggplot` object #' @references For examples, see: #' -#' +#' #' @family atom plots #' @export #' @examples #' # Add errorbar using x, ymin and ymax #' addErrorbar( -#' x = c(1, 2, 1, 2, 3), -#' ymin = c(5, 0, 2, 3, 4), -#' ymax = c(6, 2, 6, 2.5, 5) +#' x = c(1, 2, 1, 2, 3), +#' ymin = c(5, 0, 2, 3, 4), +#' ymax = c(6, 2, 6, 2.5, 5) #' ) #' #' # Add errorbar using a data.frame #' time <- seq(0, 30, 0.5) -#' errorbarData <- data.frame(x = time, ymin = cos(time)-1, ymax = cos(time)+1) +#' errorbarData <- data.frame(x = time, ymin = cos(time) - 1, ymax = cos(time) + 1) #' #' addErrorbar( #' data = errorbarData, @@ -540,15 +540,15 @@ addRibbon <- function(data = NULL, #' #' # Add a errorbar with specific properties #' p <- addErrorbar( -#' data = errorbarData, -#' color = "blue", size = 0.5, includeCap = TRUE, caption = "My data" +#' data = errorbarData, +#' color = "blue", size = 0.5, includeCap = TRUE, caption = "My data" #' ) #' addScatter( -#' x = time, y = cos(time), -#' color = "red", size = 1, caption = "My data", -#' plotObject = p +#' x = time, y = cos(time), +#' color = "red", size = 1, caption = "My data", +#' plotObject = p #' ) -#' +#' addErrorbar <- function(data = NULL, metaData = NULL, x = NULL, diff --git a/R/boxwhisker-get-measure.R b/R/boxwhisker-get-measure.R index 4d4b8f97..f5851bfd 100644 --- a/R/boxwhisker-get-measure.R +++ b/R/boxwhisker-get-measure.R @@ -1,17 +1,17 @@ #' @title getBoxWhiskerMeasure -#' @description +#' @description #' Get a summary table of Box Whisker percentiles -#' +#' #' @inheritParams plotBoxWhisker #' @param y Name of `y` variable in `data`. #' @param group Name of grouping variable in `data`. #' @param quantiles Numeric values between 0 and 1 defining the quantiles to summarize #' @return A data.frame of summary statistics #' @export -#' @examples +#' @examples #' # Get box-and-whisker plots of log-normal distributed data -#' boxData <- data.frame(x = c(rep("A", 500), rep("B",500)), y = rlnorm(1000)) -#' +#' boxData <- data.frame(x = c(rep("A", 500), rep("B", 500)), y = rlnorm(1000)) +#' #' getBoxWhiskerMeasure(data = boxData, dataMapping = BoxWhiskerDataMapping$new(x = "x", y = "y")) #' getBoxWhiskerMeasure <- function(data, diff --git a/R/boxwhisker-plotconfiguration.R b/R/boxwhisker-plotconfiguration.R index babf089f..eeb57c4f 100644 --- a/R/boxwhisker-plotconfiguration.R +++ b/R/boxwhisker-plotconfiguration.R @@ -8,7 +8,7 @@ BoxWhiskerPlotConfiguration <- R6::R6Class( public = list( #' @field defaultXScale Default xAxis scale value when creating a `BoxWhiskerPlotConfiguration` object defaultXScale = "discrete", - + #' @description Create a new `BoxWhiskerPlotConfiguration` object #' @param outliers logical defining if outliers should be included in boxplot #' @param ... parameters inherited from `PlotConfiguration` diff --git a/R/font.R b/R/font.R index 2cabf477..320cc07b 100644 --- a/R/font.R +++ b/R/font.R @@ -62,7 +62,11 @@ Font <- R6::R6Class( family = checkPlotFontFamily(fontFamily %||% self$fontFamily), angle = angle %||% self$angle, vjust = 0.5, - hjust = switch(align %||% self$align, "left" = 0, "center" = 0.5, "right" = 1) + hjust = switch(align %||% self$align, + "left" = 0, + "center" = 0.5, + "right" = 1 + ) ) } ) @@ -74,7 +78,7 @@ Font <- R6::R6Class( #' @description #' List of all available alignments/justifications for fonts #' @family enum helpers -Alignments <- enum(c("left", "center","right")) +Alignments <- enum(c("left", "center", "right")) #' @title FontFaces #' @import ospsuite.utils @@ -92,14 +96,14 @@ FontFaces <- enum(c("plain", "bold", "italic", "bold.italic")) #' @return Name of font family if available in Windows font database #' `NULL` otherwise #' @keywords internal -checkPlotFontFamily <- function(fontFamily){ - if(isEmpty(.Platform$OS.type)){ +checkPlotFontFamily <- function(fontFamily) { + if (isEmpty(.Platform$OS.type)) { return(NULL) } - if(.Platform$OS.type != "windows"){ + if (.Platform$OS.type != "windows") { return(NULL) } - if(isIncluded(fontFamily, names(grDevices::windowsFonts()))){ + if (isIncluded(fontFamily, names(grDevices::windowsFonts()))) { return(fontFamily) } return(NULL) diff --git a/R/histogram-datamapping.R b/R/histogram-datamapping.R index f59edfb0..0e99f0cd 100644 --- a/R/histogram-datamapping.R +++ b/R/histogram-datamapping.R @@ -25,10 +25,10 @@ HistogramDataMapping <- R6::R6Class( #' @param ... parameters inherited from `XYGDataMapping` #' @return A new `HistogramDataMapping` object initialize = function(stack = FALSE, - bins = NULL, - binwidth = NULL, - distribution = NULL, - ...) { + bins = NULL, + binwidth = NULL, + distribution = NULL, + ...) { super$initialize(...) validateIsLogical(stack) validateIsIncluded(distribution, c("none", "normal", "logNormal"), nullAllowed = TRUE) diff --git a/R/label.R b/R/label.R index 1150bb0c..c138041b 100644 --- a/R/label.R +++ b/R/label.R @@ -57,7 +57,8 @@ Label <- R6::R6Class( fontFace = fontFace, fontFamily = fontFamily, angle = angle, - align = align)) + align = align + )) } ), active = list( diff --git a/R/observed-data-mapping.R b/R/observed-data-mapping.R index 049b6758..a75be9ba 100644 --- a/R/observed-data-mapping.R +++ b/R/observed-data-mapping.R @@ -39,16 +39,16 @@ ObservedDataMapping <- R6::R6Class( color = NULL, shape = NULL, group = NULL, - data = NULL){ + data = NULL) { validateIsString(uncertainty, nullAllowed = TRUE) validateIsString(error, nullAllowed = TRUE) validateIsString(ymin, nullAllowed = TRUE) validateIsString(ymax, nullAllowed = TRUE) validateIsString(mdv, nullAllowed = TRUE) super$initialize(x = x, y = y, color = color, shape = shape, group = group, data = data) - + # If defined, ymin and ymax are used as is - # If not, error/uncertainty are used and + # If not, error/uncertainty are used and # creates ymin and ymax as y +/- error self$error <- error %||% uncertainty self$ymin <- ymin %||% ifNotNull(self$error, "ymin") @@ -65,10 +65,10 @@ ObservedDataMapping <- R6::R6Class( validateIsOfType(data, "data.frame") validateIsIncluded(self$error, names(data), nullAllowed = TRUE) validateIsIncluded(self$mdv, names(data), nullAllowed = TRUE) - + # Using super method, fetches x, y and groups mapData <- super$checkMapData(data, metaData) - + # ymin and ymax for error bars # This section may change depending on how we want to include options if (!isEmpty(self$error)) { @@ -78,15 +78,15 @@ ObservedDataMapping <- R6::R6Class( mapData[, self$ymin] <- data[, self$y] - data[, self$error] } # Overwrite ymin and ymax if user defined - if(isIncluded(self$ymax, names(data))){ - mapData[, self$ymax] <- data[,self$ymax] + if (isIncluded(self$ymax, names(data))) { + mapData[, self$ymax] <- data[, self$ymax] } - if(isIncluded(self$ymin, names(data))){ - mapData[, self$ymin] <- data[,self$ymin] + if (isIncluded(self$ymin, names(data))) { + mapData[, self$ymin] <- data[, self$ymin] } # MDV is a Nonmem notation in which values with MDV==1 are removed if (!isEmpty(self$mdv)) { - mapData[, self$mdv] <- as.logical(data[,self$mdv]) + mapData[, self$mdv] <- as.logical(data[, self$mdv]) mapData <- mapData[!mapData[, self$mdv], ] } return(mapData) diff --git a/R/pkratio-datamapping.R b/R/pkratio-datamapping.R index 33277835..efb027cb 100644 --- a/R/pkratio-datamapping.R +++ b/R/pkratio-datamapping.R @@ -40,8 +40,8 @@ PKRatioDataMapping <- R6::R6Class( mapData <- super$checkMapData(data, metaData) # This may change depending of how we want to include options if (!isOfLength(self$error, 0)) { - mapData$ymax <- data[, self$y]*(1 + data[, self$error]) - mapData$ymin <- data[, self$y]*(1 - data[, self$error]) + mapData$ymax <- data[, self$y] * (1 + data[, self$error]) + mapData$ymin <- data[, self$y] * (1 - data[, self$error]) } self$data <- mapData return(mapData) diff --git a/R/pkratio-get-measure.R b/R/pkratio-get-measure.R index 038fa640..8da674a6 100644 --- a/R/pkratio-get-measure.R +++ b/R/pkratio-get-measure.R @@ -1,24 +1,24 @@ #' @title getPKRatioMeasure -#' @description +#' @description #' Get a summary table of PK Ratio within specific limits -#' +#' #' @inheritParams plotPKRatio #' @param ratioLimits Numeric positive values limits #' @return A data.frame of summary of PK Ratio within specific limits #' @export -#' @examples +#' @examples #' # Get summary of usual PK Ratio limits #' pkData <- data.frame(x = c(1, 2, 1, 2, 3), y = c(5, 0.2, 2, 3, 4)) -#' +#' #' getPKRatioMeasure(data = pkData, dataMapping = PKRatioDataMapping$new(x = "x", y = "y")) -#' +#' #' # Get summary of other PK Ratio limits #' getPKRatioMeasure( -#' data = pkData, -#' dataMapping = PKRatioDataMapping$new(x = "x", y = "y"), -#' ratioLimits = seq(1.5, 5, 0.5) +#' data = pkData, +#' dataMapping = PKRatioDataMapping$new(x = "x", y = "y"), +#' ratioLimits = seq(1.5, 5, 0.5) #' ) -#' +#' getPKRatioMeasure <- function(data, dataMapping = NULL, ratioLimits = c(1.5, 2)) { if (is.numeric(data)) { PKratios <- data[!is.na(data)] diff --git a/R/plot-boxwhisker.R b/R/plot-boxwhisker.R index 5f5b897b..c292c6cb 100644 --- a/R/plot-boxwhisker.R +++ b/R/plot-boxwhisker.R @@ -4,9 +4,9 @@ #' #' @inheritParams addScatter #' @param outliers Logical defining if outliers should be included in boxplot -#' @param dataMapping +#' @param dataMapping #' A `BoxWhiskerDataMapping` object mapping `x`, `y` and aesthetic groups to their variable names of `data`. -#' @param plotConfiguration +#' @param plotConfiguration #' An optional `BoxWhiskerConfiguration` object defining labels, grid, background and watermark. #' @return A `ggplot` object #' @@ -15,17 +15,19 @@ #' #' @export #' @family molecule plots -#' @examples +#' @examples #' # Produce box-and-whisker plots of log-normal distributed data -#' boxData <- data.frame(x = c(rep("A", 500), rep("B",500)), y = rlnorm(1000)) -#' +#' boxData <- data.frame(x = c(rep("A", 500), rep("B", 500)), y = rlnorm(1000)) +#' #' plotBoxWhisker(data = boxData, dataMapping = BoxWhiskerDataMapping$new(x = "x", y = "y")) -#' +#' #' # Remove outliers from boxplot -#' plotBoxWhisker(data = boxData, -#' dataMapping = BoxWhiskerDataMapping$new(x = "x", y = "y"), -#' outliers = FALSE) -#' +#' plotBoxWhisker( +#' data = boxData, +#' dataMapping = BoxWhiskerDataMapping$new(x = "x", y = "y"), +#' outliers = FALSE +#' ) +#' plotBoxWhisker <- function(data, metaData = NULL, outliers = NULL, @@ -68,9 +70,9 @@ plotBoxWhisker <- function(data, } #' @title addBoxWhisker -#' @description +#' @description #' Add a boxplot layer to a `ggplot` object (without outliers) -#' +#' #' @inheritParams plotBoxWhisker #' @return A `ggplot` object #' @keywords internal @@ -122,9 +124,9 @@ addBoxWhisker <- function(data, metaData, dataMapping, plotConfiguration, plotOb } #' @title addOutliers -#' @description +#' @description #' Add scatter points for outliers to `ggplot` object -#' +#' #' @inheritParams plotBoxWhisker #' @return A `ggplot` object #' @keywords internal diff --git a/R/plot-ddiratio.R b/R/plot-ddiratio.R index b00a9ca7..7a5ddb15 100644 --- a/R/plot-ddiratio.R +++ b/R/plot-ddiratio.R @@ -3,11 +3,11 @@ #' Producing DDI Ratio plots #' #' @inheritParams addScatter -#' @param residualsVsObserved Optional logical value defining +#' @param residualsVsObserved Optional logical value defining #' if DDI Ratio plot is drawn as residuals vs observed, instead of predicted vs observed. -#' @param dataMapping +#' @param dataMapping #' A `DDIRatioDataMapping` object mapping `x`, `y` and aesthetic groups to their variable names of `data`. -#' @param plotConfiguration +#' @param plotConfiguration #' An optional `DDIRatioPlotConfiguration` object defining labels, grid, background and watermark. #' @return A `ggplot` object #' @@ -16,12 +16,12 @@ #' #' @export #' @family molecule plots -#' @examples +#' @examples #' # Produce DDI Ratio plot #' ddiData <- data.frame(x = c(1, 2, 1, 2, 3), y = c(5, 0.2, 2, 3, 4)) -#' +#' #' plotDDIRatio(data = ddiData, dataMapping = DDIRatioDataMapping$new(x = "x", y = "y")) -#' +#' plotDDIRatio <- function(data, metaData = NULL, dataMapping = NULL, @@ -39,7 +39,7 @@ plotDDIRatio <- function(data, validateIsLogical(residualsVsObserved, nullAllowed = FALSE) lineOrientation <- "diagonal" - if(residualsVsObserved){ + if (residualsVsObserved) { lineOrientation <- "ddiHorizontal" } # Include horizontal lines @@ -84,20 +84,20 @@ plotDDIRatio <- function(data, } #' @title getGuestValuesFromDataMapping -#' @description +#' @description #' Get a data.frame with Guest et al. ratio limits from `data` and its `DDIRatioDataMapping` #' @inheritParams plotDDIRatio #' @return A data.frame with `x`, `ymin` and `ymax` defining Guest et al. limits #' @export -#' @examples +#' @examples #' # Get the data.frame of Guest et al. limits #' ddiData <- data.frame(x = c(1, 2, 1, 2, 3), y = c(5, 0.2, 2, 3, 4)) -#' +#' #' getGuestValuesFromDataMapping( -#' data = ddiData, -#' dataMapping = DDIRatioDataMapping$new(x = "x", y = "y") +#' data = ddiData, +#' dataMapping = DDIRatioDataMapping$new(x = "x", y = "y") #' ) -#' +#' getGuestValuesFromDataMapping <- function(data, dataMapping) { # Create vector of x values @@ -110,29 +110,29 @@ getGuestValuesFromDataMapping <- function(data, } #' @title getGuestValues -#' @description +#' @description #' Get a data.frame with Guest et al. ratio limits with: #' \itemize{ #' \item `ymax` = `x`.`limit` #' \item `ymin` = `x`/`limit` #' \item `limit` = (`delta`+2(`x`-1))/`x` #' } -#' +#' #' @param x Numeric values input of Guest function #' @param delta Numeric value parameter of Guest function -#' @param residualsVsObserved Logical value defining +#' @param residualsVsObserved Logical value defining #' if limits are claculated as residuals vs observed, instead of predicted vs observed. #' @return A data.frame with `x`, `ymin` and `ymax` defining Guest et al. limits -#' @references +#' @references #' #' @export -#' @examples +#' @examples #' # Get predicted vs observed Guest et al. limits -#' getGuestValues(x = 10^seq(-2,2,0.2)) -#' +#' getGuestValues(x = 10^seq(-2, 2, 0.2)) +#' #' # Get residuals vs observed Guest et al. limits -#' getGuestValues(x = 10^seq(-2,2,0.2), residualsVsObserved = TRUE) -#' +#' getGuestValues(x = 10^seq(-2, 2, 0.2), residualsVsObserved = TRUE) +#' getGuestValues <- function(x, delta = 1, residualsVsObserved = FALSE) { xSym <- x xSym[x < 1] <- 1 / x[x < 1] @@ -140,8 +140,8 @@ getGuestValues <- function(x, delta = 1, residualsVsObserved = FALSE) { ymin <- x / limit ymax <- x * limit - if(residualsVsObserved){ - guestLines <- data.frame(x = x, ymin =1/limit, ymax = limit) + if (residualsVsObserved) { + guestLines <- data.frame(x = x, ymin = 1 / limit, ymax = limit) return(guestLines) } guestLines <- data.frame(x = x, ymin = ymin, ymax = ymax) diff --git a/R/plot-histogram.R b/R/plot-histogram.R index 173789b7..3f302025 100644 --- a/R/plot-histogram.R +++ b/R/plot-histogram.R @@ -12,9 +12,9 @@ #' @param stack Logical defining for multiple histograms if their bars are stacked #' @param distribution Name of distribution to fit to the data. #' Only 2 distributions are currently available: `"normal"` and `"logNormal"` -#' @param dataMapping +#' @param dataMapping #' A `HistogramDataMapping` object mapping `x` and aesthetic groups to their variable names of `data`. -#' @param plotConfiguration +#' @param plotConfiguration #' An optional `HistogramPlotConfiguration` object defining labels, grid, background and watermark. #' @return A `ggplot` object #' @@ -23,17 +23,16 @@ #' #' @export #' @family molecule plots -#' @examples +#' @examples #' # Produce histogram of normally distributed data #' plotHistogram(x = rnorm(100)) -#' +#' #' # Produce histogram of normally distributed data with many bins #' plotHistogram(x = rlnorm(100), bins = 21) -#' +#' #' # Produce histogram of fitted normally distributed data #' plotHistogram(x = rlnorm(100), distribution = "normal") -#' -#' +#' plotHistogram <- function(data = NULL, metaData = NULL, x = NULL, @@ -74,7 +73,7 @@ plotHistogram <- function(data = NULL, dataMapping$distribution <- distribution %||% dataMapping$distribution dataMapping$bins <- bins %||% dataMapping$bins dataMapping$binwidth <- binwidth %||% dataMapping$binwidth - + plotObject <- plotObject %||% initializePlot(plotConfiguration) if (nrow(data) == 0) { @@ -90,9 +89,9 @@ plotHistogram <- function(data = NULL, if (dataMapping$stack) { position <- ggplot2::position_stack() } - + edges <- NULL - if(length(dataMapping$bins)>1){ + if (length(dataMapping$bins) > 1) { edges <- dataMapping$bins } @@ -115,8 +114,8 @@ plotHistogram <- function(data = NULL, # If distribution is provided by dataMapping, get median and distribution of the data fitData <- getDistributionFit(mapData, dataMapping) fitMedian <- getDistributionMed(mapData, dataMapping) - - if(!isOfLength(fitData, 0)){ + + if (!isOfLength(fitData, 0)) { plotObject <- plotObject + ggplot2::geom_line( data = fitData, @@ -162,11 +161,11 @@ getDistributionFit <- function(data, dataMapping) { x <- data[, dataMapping$x] # Get array of x values xFit <- seq(min(x, na.rm = TRUE), max(x, na.rm = TRUE), length.out = 1e3) - #switch( - #dataMapping$distribution, - #"normal" = seq(-max(abs(x), na.rm = TRUE), max(abs(x), na.rm = TRUE), length.out = 1e3), - #"logNormal" = seq(0, max(abs(x), na.rm = TRUE), length.out = 1e3) - #) + # switch( + # dataMapping$distribution, + # "normal" = seq(-max(abs(x), na.rm = TRUE), max(abs(x), na.rm = TRUE), length.out = 1e3), + # "logNormal" = seq(0, max(abs(x), na.rm = TRUE), length.out = 1e3) + # ) # Get binwidth bins <- dataMapping$bins @@ -179,8 +178,7 @@ getDistributionFit <- function(data, dataMapping) { if (dataMapping$stack) { dataFit <- data.frame( x = xFit, - y = length(x) * binwidth * switch( - dataMapping$distribution, + y = length(x) * binwidth * switch(dataMapping$distribution, "normal" = stats::dnorm(xFit, mean = mean(x, na.rm = TRUE), sd = stats::sd(x, na.rm = TRUE)), "logNormal" = stats::dlnorm(xFit, meanlog = mean(log(x), na.rm = TRUE), sdlog = stats::sd(log(x), na.rm = TRUE)) ), @@ -196,8 +194,7 @@ getDistributionFit <- function(data, dataMapping) { dataFit, data.frame( x = xFit, - y = length(x[selectedGroup]) * binwidth * switch( - dataMapping$distribution, + y = length(x[selectedGroup]) * binwidth * switch(dataMapping$distribution, "normal" = stats::dnorm( xFit, mean = mean(x[selectedGroup], na.rm = TRUE), @@ -233,8 +230,7 @@ getDistributionMed <- function(data, dataMapping) { x <- data[, dataMapping$x] if (dataMapping$stack) { return( - switch( - dataMapping$distribution, + switch(dataMapping$distribution, "normal" = mean(x, na.rm = TRUE), "logNormal" = exp(mean(log(x), na.rm = TRUE) - stats::var(log(x), na.rm = TRUE)) ) @@ -246,8 +242,7 @@ getDistributionMed <- function(data, dataMapping) { selectedGroup <- data$legendLabels %in% groupLevel xintercept <- c( xintercept, - switch( - dataMapping$distribution, + switch(dataMapping$distribution, "normal" = mean(x[selectedGroup], na.rm = TRUE), "logNormal" = exp(mean(log(x[selectedGroup]), na.rm = TRUE) - stats::var(log(x[selectedGroup]), na.rm = TRUE)) ) diff --git a/R/plot-obs-vs-pred.R b/R/plot-obs-vs-pred.R index a7a7c19e..94a87519 100644 --- a/R/plot-obs-vs-pred.R +++ b/R/plot-obs-vs-pred.R @@ -3,32 +3,32 @@ #' Producing observed vs predicted plots #' #' @inheritParams addScatter -#' @param smoother Optional name of smoother function: +#' @param smoother Optional name of smoother function: #' \itemize{ #' \item `"loess"` for loess regression #' \item `"lm"` for linear regression #' } -#' @param dataMapping +#' @param dataMapping #' A `ObsVsPredDataMapping` object mapping `x`, `y` and aesthetic groups to their variable names of `data`. -#' @param plotConfiguration +#' @param plotConfiguration #' An optional `ObsVsPredConfiguration` object defining labels, grid, background and watermark. #' @return A `ggplot` object #' #' @export #' @family molecule plots -#' @examples +#' @examples #' # Produce Obs vs Pred plot #' obsVsPredData <- data.frame(x = c(1, 2, 1, 2, 3), y = c(5, 0.2, 2, 3, 4)) -#' +#' #' plotObsVsPred(data = obsVsPredData, dataMapping = ObsVsPredDataMapping$new(x = "x", y = "y")) -#' +#' #' # Produce Obs vs Pred plot with linear regression #' plotObsVsPred( -#' data = obsVsPredData, -#' dataMapping = ObsVsPredDataMapping$new(x = "x", y = "y"), -#' smoother = "lm" +#' data = obsVsPredData, +#' dataMapping = ObsVsPredDataMapping$new(x = "x", y = "y"), +#' smoother = "lm" #' ) -#' +#' plotObsVsPred <- function(data, metaData = NULL, dataMapping = NULL, diff --git a/R/plot-pkratio.R b/R/plot-pkratio.R index 4e05d0c3..072e25bf 100644 --- a/R/plot-pkratio.R +++ b/R/plot-pkratio.R @@ -3,9 +3,9 @@ #' Producing PK Ratio plots #' #' @inheritParams addScatter -#' @param dataMapping +#' @param dataMapping #' A `PKRatioDataMapping` object mapping `x`, `y` and aesthetic groups to their variable names of `data`. -#' @param plotConfiguration +#' @param plotConfiguration #' An optional `PKRatioPlotConfiguration` object defining labels, grid, background and watermark. #' @return A `ggplot` object #' @@ -14,12 +14,12 @@ #' #' @export #' @family molecule plots -#' @examples +#' @examples #' # Produce PK Ratio plot #' pkData <- data.frame(x = c(1, 2, 1, 2, 3), y = c(5, 0.2, 2, 3, 4)) -#' +#' #' plotPKRatio(data = pkData, dataMapping = PKRatioDataMapping$new(x = "x", y = "y")) -#' +#' plotPKRatio <- function(data, metaData = NULL, dataMapping = NULL, diff --git a/R/plot-res-vs-pred.R b/R/plot-res-vs-pred.R index 0ef30e17..5eeadaa2 100644 --- a/R/plot-res-vs-pred.R +++ b/R/plot-res-vs-pred.R @@ -7,17 +7,17 @@ #' #' @export #' @family molecule plots -#' @examples +#' @examples #' # Produce Obs vs Pred plot #' resVsPredData <- data.frame(x = c(1, 2, 1, 2, 3), y = c(5, 0.2, 2, 3, 4)) -#' +#' #' plotResVsPred(data = resVsPredData, dataMapping = ResVsPredDataMapping$new(x = "x", y = "y")) -#' +#' #' # Produce Res vs Pred plot with linear regression #' plotResVsPred( -#' data = resVsPredData, -#' dataMapping = ResVsPredDataMapping$new(x = "x", y = "y"), -#' smoother = "lm" +#' data = resVsPredData, +#' dataMapping = ResVsPredDataMapping$new(x = "x", y = "y"), +#' smoother = "lm" #' ) plotResVsPred <- function(data, metaData = NULL, diff --git a/R/plot-timeprofile.R b/R/plot-timeprofile.R index 9f60685a..f4bd3b7e 100644 --- a/R/plot-timeprofile.R +++ b/R/plot-timeprofile.R @@ -255,7 +255,7 @@ plotTimeProfile <- function(data = NULL, selectionKey = plotConfiguration$lines$color, aesthetic = "color" ), - # By using position = colorLength, + # By using position = colorLength, # the function will start selecting the colors that come after the colors selected for lines # this aims at preventing a reset of the colors and a need for manual update of the user getAestheticValues( diff --git a/R/plot-tornado.R b/R/plot-tornado.R index eb748ecb..e6e2f007 100644 --- a/R/plot-tornado.R +++ b/R/plot-tornado.R @@ -7,24 +7,24 @@ #' @param sorted Optional logical value defining if `y` values are sorted by absolute values of `x`. #' @param colorPalette Optional character values defining a `ggplot2` colorPalette (e.g. `"Spectral"`) #' @param bar Optional logical value setting tornado plot as bar plot instead of scatter plot. -#' @param dataMapping +#' @param dataMapping #' A `TornadoDataMapping` object mapping `x`, `y` and aesthetic groups to their variable names of `data`. -#' @param plotConfiguration +#' @param plotConfiguration #' An optional `TornadoPlotConfiguration` object defining labels, grid, background and watermark. #' @return A `ggplot` object #' #' @export #' @family molecule plots -#' @examples +#' @examples #' # Produce a tornado plot #' plotTornado(x = c(2, -1, 3), y = c("A", "B", "C")) -#' +#' #' # Produce a tornado plot as scatter plot #' plotTornado(x = c(2, -1, 3), y = c("A", "B", "C"), bar = FALSE) -#' +#' #' # Produce a tornado plot as is (no sorting) #' plotTornado(x = c(2, -1, 3), y = c("A", "B", "C"), sorted = FALSE) -#' +#' plotTornado <- function(data = NULL, metaData = NULL, x = NULL, diff --git a/R/plotconfiguration-axis.R b/R/plotconfiguration-axis.R index 7291fc10..ee38d53c 100644 --- a/R/plotconfiguration-axis.R +++ b/R/plotconfiguration-axis.R @@ -56,11 +56,11 @@ AxisConfiguration <- R6::R6Class( #' If `FALSE`, some space between data and axis is kept #' @return A new `AxisConfiguration` object initialize = function(limits = NULL, - scale = Scaling$lin, - ticks = NULL, - ticklabels = NULL, - font = NULL, - expand = FALSE) { + scale = Scaling$lin, + ticks = NULL, + ticklabels = NULL, + font = NULL, + expand = FALSE) { validateIsNumeric(limits, nullAllowed = TRUE) validateIsOfType(font, "Font", nullAllowed = TRUE) validateIsLogical(expand) @@ -87,8 +87,7 @@ AxisConfiguration <- R6::R6Class( #' @description Get the `ggplot2` actual `trans` name of scale #' @return A character included in `ggplot2` available `trans` names ggplotScale = function() { - switch( - private$.scale, + switch(private$.scale, "log" = "log10", "ln" = "log", private$.scale @@ -113,8 +112,7 @@ AxisConfiguration <- R6::R6Class( return(private$.ticks) } # Default tick values as a function of scale - switch( - private$.scale, + switch(private$.scale, "log" = tlfEnv$logTicks, "ln" = tlfEnv$lnTicks, private$.ticks @@ -131,8 +129,7 @@ AxisConfiguration <- R6::R6Class( } # Default tick labels as a function of scale # ggplot2 accepts functions as input for labels - switch( - private$.scale, + switch(private$.scale, "log" = getLogTickLabels, "ln" = getLnTickLabels, "sqrt" = getSqrtTickLabels, @@ -266,8 +263,7 @@ XAxisConfiguration <- R6::R6Class( ) # Add special tick lines for pretty log plots suppressMessages( - plotObject <- switch( - private$.scale, + plotObject <- switch(private$.scale, "log" = plotObject + ggplot2::annotation_logticks(sides = "b", color = private$.font$color), "ln" = plotObject + ggplot2::annotation_logticks(base = exp(1), sides = "b", color = private$.font$color), plotObject @@ -324,8 +320,7 @@ YAxisConfiguration <- R6::R6Class( ) # Add special tick lines for pretty log plots suppressMessages( - plotObject <- switch( - private$.scale, + plotObject <- switch(private$.scale, "log" = plotObject + ggplot2::annotation_logticks(sides = "l", color = private$.font$color), "ln" = plotObject + ggplot2::annotation_logticks(base = exp(1), sides = "l", color = private$.font$color), plotObject diff --git a/R/plotconfiguration-background.R b/R/plotconfiguration-background.R index c5edd73b..23d6171c 100644 --- a/R/plotconfiguration-background.R +++ b/R/plotconfiguration-background.R @@ -152,7 +152,7 @@ BackgroundElement <- R6::R6Class( ggplot2::element_rect( fill = fill %||% self$fill, colour = color %||% self$color, - size = size %||% as.numeric(self$size), + size = size %||% as.numeric(self$size), linetype = linetype %||% self$linetype ) } @@ -174,7 +174,7 @@ LineElement <- R6::R6Class( createPlotElement = function(color = NULL, size = NULL, linetype = NULL) { ggplot2::element_line( colour = color %||% self$color, - size = size %||% as.numeric(self$size), + size = size %||% as.numeric(self$size), linetype = linetype %||% self$linetype ) } diff --git a/R/plotconfiguration-export.R b/R/plotconfiguration-export.R index 709af35e..e092b22e 100644 --- a/R/plotconfiguration-export.R +++ b/R/plotconfiguration-export.R @@ -1,6 +1,8 @@ #' @title ExportConfiguration #' @description R6 class defining properties for saving a `ggplot` object #' @field name character defining the name of the file to be saved (without extension) +#' @field path Path of the directory to save plot to: path and filename are +#' combined to create the fully qualified file name. Defaults to the working directory. #' @field format character defining the format of the file to be saved #' @field width numeric values defining the width in `units` of the plot dimensions after saving #' @field height numeric values defining the height in `units` of the plot dimensions after saving @@ -12,6 +14,7 @@ ExportConfiguration <- R6::R6Class( "ExportConfiguration", public = list( name = NULL, + path = NULL, format = NULL, width = NULL, height = NULL, @@ -20,18 +23,21 @@ ExportConfiguration <- R6::R6Class( #' @description Create a new `ExportConfiguration` object #' @param name character defining the name of the file to be saved (without extension) + #' @param path Path of the directory to save plot to: path and filename are + #' combined to create the fully qualified file name. Defaults to the working directory. #' @param format character defining the format of the file to be saved. #' @param width numeric values defining the width in `units` of the plot dimensions after saving #' @param height numeric values defining the height in `units` of the plot dimensions after saving #' @param units character defining the unit of the saving dimension #' @param dpi numeric value defining plot resolution (dots per inch) #' @return A new `ExportConfiguration` object - initialize = function(name = NULL, - format = NULL, - width = NULL, - height = NULL, - units = NULL, - dpi = NULL) { + initialize = function(path = NULL, + name = NULL, + format = NULL, + width = NULL, + height = NULL, + units = NULL, + dpi = NULL) { validateIsString(name, nullAllowed = TRUE) validateIsString(format, nullAllowed = TRUE) validateIsIncluded(units, c("cm", "in", "mm", "px"), nullAllowed = TRUE) @@ -39,7 +45,7 @@ ExportConfiguration <- R6::R6Class( validateIsNumeric(height, nullAllowed = TRUE) validateIsNumeric(dpi, nullAllowed = TRUE) - inputs <- c("name", "format", "width", "height", "units", "dpi") + inputs <- c("path", "name", "format", "width", "height", "units", "dpi") associateExpressions <- parse(text = paste0("self$", inputs, " <- ", inputs, " %||% tlfEnv$defaultExportParameters$", inputs)) eval(associateExpressions) }, @@ -76,6 +82,7 @@ ExportConfiguration <- R6::R6Class( self$convertPixels() ggplot2::ggsave( + path = self$path, filename = fileName, plot = plotObject, width = self$width, diff --git a/R/plotconfiguration-label.R b/R/plotconfiguration-label.R index 3cc834a8..151c73b2 100644 --- a/R/plotconfiguration-label.R +++ b/R/plotconfiguration-label.R @@ -61,7 +61,7 @@ LabelConfiguration <- R6::R6Class( return(private$.title) } validateIsOfType(value, c("character", "Label"), nullAllowed = TRUE) - if(isOfType(value, "Label")){ + if (isOfType(value, "Label")) { private$.title <- asLabel(value) } private$.title <- asLabel(value, font = private$.title$font) @@ -73,7 +73,7 @@ LabelConfiguration <- R6::R6Class( return(private$.subtitle) } validateIsOfType(value, c("character", "Label"), nullAllowed = TRUE) - if(isOfType(value, "Label")){ + if (isOfType(value, "Label")) { private$.subtitle <- asLabel(value) } private$.subtitle <- asLabel(value, font = private$.subtitle$font) @@ -85,7 +85,7 @@ LabelConfiguration <- R6::R6Class( return(private$.xlabel) } validateIsOfType(value, c("character", "Label"), nullAllowed = TRUE) - if(isOfType(value, "Label")){ + if (isOfType(value, "Label")) { private$.xlabel <- asLabel(value) } private$.xlabel <- asLabel(value, font = private$.xlabel$font) @@ -97,7 +97,7 @@ LabelConfiguration <- R6::R6Class( return(private$.ylabel) } validateIsOfType(value, c("character", "Label"), nullAllowed = TRUE) - if(isOfType(value, "Label")){ + if (isOfType(value, "Label")) { private$.ylabel <- asLabel(value) } private$.ylabel <- asLabel(value, font = private$.ylabel$font) @@ -109,7 +109,7 @@ LabelConfiguration <- R6::R6Class( return(private$.caption) } validateIsOfType(value, c("character", "Label"), nullAllowed = TRUE) - if(isOfType(value, "Label")){ + if (isOfType(value, "Label")) { private$.caption <- asLabel(value) } private$.caption <- asLabel(value, font = private$.caption$font) diff --git a/R/plotconfiguration-legend.R b/R/plotconfiguration-legend.R index 1ad9f96b..0cf88e77 100644 --- a/R/plotconfiguration-legend.R +++ b/R/plotconfiguration-legend.R @@ -28,10 +28,10 @@ LegendConfiguration <- R6::R6Class( # Title properties private$.title <- asLabel(title, font = currentTheme$fonts$legendTitle) - if(isOfType(title, "Label")){ + if (isOfType(title, "Label")) { private$.title <- title } - + private$.caption <- caption %||% data.frame() }, @@ -52,7 +52,7 @@ LegendConfiguration <- R6::R6Class( # Update legend position and alignment legendPosition <- createPlotLegendPosition(private$.position) - + plotObject <- plotObject + ggplot2::theme( legend.position = c(legendPosition$xPosition, legendPosition$yPosition), legend.justification = c(legendPosition$xJustification, legendPosition$yJustification), @@ -91,7 +91,7 @@ LegendConfiguration <- R6::R6Class( private$.font <- value %||% currentTheme$fonts$legend return(invisible()) }, - + #' @field background `Background` object defining the background of the legend background = function(value) { if (missing(value)) { @@ -108,7 +108,7 @@ LegendConfiguration <- R6::R6Class( return(private$.title) } validateIsOfType(value, c("character", "Label"), nullAllowed = TRUE) - if(isOfType(value, "Label")){ + if (isOfType(value, "Label")) { private$.title <- asLabel(value) } private$.title <- asLabel(value, font = private$.title$font) diff --git a/R/plotconfiguration.R b/R/plotconfiguration.R index f4ccb39e..50a71862 100644 --- a/R/plotconfiguration.R +++ b/R/plotconfiguration.R @@ -12,7 +12,7 @@ PlotConfiguration <- R6::R6Class( "PlotConfiguration", public = list( export = NULL, - # Caution, helper enum Scaling doesn't work here + # Caution, helper enum Scaling doesn't work here # (even using @include to collate and define the variable beforehand) defaultXScale = "lin", defaultYScale = "lin", @@ -168,7 +168,7 @@ PlotConfiguration <- R6::R6Class( private$.ribbons <- ribbons %||% getThemePropertyFor(plotConfiguration = self, propertyName = "ribbons") private$.points <- points %||% getThemePropertyFor(plotConfiguration = self, propertyName = "points") private$.errorbars <- errorbars %||% getThemePropertyFor(plotConfiguration = self, propertyName = "errorbars") - + # Define export configuration, overwrite properties only if they are defined validateIsOfType(export, "ExportConfiguration", nullAllowed = TRUE) self$export <- export %||% ExportConfiguration$new() diff --git a/R/themes.R b/R/themes.R index 3cead543..c13a8444 100644 --- a/R/themes.R +++ b/R/themes.R @@ -78,7 +78,8 @@ ThemeFont <- R6::R6Class( "fontFace = ", fieldNames, "$fontFace %||% baseFace,", "fontFamily = ", fieldNames, "$fontFamily %||% baseFamily,", "angle = ", fieldNames, "$angle %||% baseAngle,", - "align = ", fieldNames, "$align %||% baseAlign)")) + "align = ", fieldNames, "$align %||% baseAlign)" + )) eval(setFontExpression) }, @@ -94,7 +95,8 @@ ThemeFont <- R6::R6Class( "angle = self$", fieldNames, "$angle,", "align = self$", fieldNames, "$align,", "fontFace = self$", fieldNames, "$fontFace,", - "fontFamily = self$", fieldNames, "$fontFamily)")) + "fontFamily = self$", fieldNames, "$fontFamily)" + )) eval(setJsonExpression) return(jsonObject) } @@ -180,12 +182,14 @@ ThemeBackground <- R6::R6Class( "fill = ", areaFieldNames, "$fill %||% baseFill,", "color = ", areaFieldNames, "$color %||% baseColor,", "size = ", areaFieldNames, "$size %||% baseSize,", - "linetype = ", areaFieldNames, "$linetype %||% baseLinetype)")) + "linetype = ", areaFieldNames, "$linetype %||% baseLinetype)" + )) setLineExpression <- parse(text = paste0( "self$", lineFieldNames, " <- LineElement$new(", "color = ", lineFieldNames, "$color %||% baseColor,", "size = ", lineFieldNames, "$size %||% baseSize,", - "linetype = ", lineFieldNames, "$linetype %||% baseLinetype)")) + "linetype = ", lineFieldNames, "$linetype %||% baseLinetype)" + )) eval(setAreaExpression) eval(setLineExpression) }, @@ -205,12 +209,14 @@ ThemeBackground <- R6::R6Class( "fill = self$", areaFieldNames, "$fill,", "color = self$", areaFieldNames, "$color,", "size = self$", areaFieldNames, "$size,", - "linetype = self$", areaFieldNames, "$linetype)")) + "linetype = self$", areaFieldNames, "$linetype)" + )) setJsonLineExpression <- parse(text = paste0( "jsonObject$", lineFieldNames, " <- list(", "color = self$", lineFieldNames, "$color,", "size = self$", lineFieldNames, "$size,", - "linetype = self$", lineFieldNames, "$linetype)")) + "linetype = self$", lineFieldNames, "$linetype)" + )) eval(setJsonAreaExpression) eval(setJsonLineExpression) return(jsonObject) @@ -533,4 +539,3 @@ Theme <- R6::R6Class( .plotConfigurations = NULL ) ) - diff --git a/R/tlf-env.R b/R/tlf-env.R index 2918b06b..15940b29 100644 --- a/R/tlf-env.R +++ b/R/tlf-env.R @@ -46,13 +46,13 @@ setDefaultLegendPosition <- function(position) { } tlfEnv$defaultExportParameters <- list( - format = "png", - width = 16, - height = 9, + format = "png", + width = 16, + height = 9, units = "cm", dpi = 300, name = "figure" - ) +) #' @title setDefaultExportParameters #' @description Set default tlf properties for exporting/saving plots @@ -70,7 +70,7 @@ setDefaultExportParameters <- function(format = NULL, width = NULL, height = NUL validateIsNumeric(height, nullAllowed = TRUE) validateIsNumeric(dpi, nullAllowed = TRUE) validateIsString(name, nullAllowed = TRUE) - + inputs <- c("format", "width", "height", "units", "dpi", "name") eval(parseVariableToObject(objectName = "tlfEnv$defaultExportParameters", inputs, keepIfNull = TRUE)) return(invisible()) @@ -134,13 +134,13 @@ setDefaultAggregationLabels <- function(y = NULL, range = NULL) { #' @description Set default aggregation bins of tlf environment #' @param bins Number of bins if value, edges if vector or binning function if function #' @export -#' @examples +#' @examples #' # Set default number of bins #' plotHistogram(x = rnorm(1000)) -#' +#' #' setDefaultAggregationBins(21) #' plotHistogram(x = rnorm(1000)) -#' +#' setDefaultAggregationBins <- function(bins = NULL) { tlfEnv$defaultAggregation$bins <- bins %||% tlfEnv$defaultAggregation$bins } @@ -149,15 +149,15 @@ setDefaultAggregationBins <- function(bins = NULL) { #' @description Set default watermark value for current theme #' @param watermark A character value or `Label` object #' @export -#' @examples +#' @examples #' # Set default watermark using a character #' setDefaultWatermark("Confidential") #' addScatter(x = c(1, 2, 1, 2, 3), y = c(5, 0, 2, 3, 4)) -#' +#' #' # Set default watermark using a `Label` object #' setDefaultWatermark(Label$new(text = "Confidential", color = "red", angle = 30)) #' addScatter(x = c(1, 2, 1, 2, 3), y = c(5, 0, 2, 3, 4)) -#' +#' setDefaultWatermark <- function(watermark = NULL) { validateIsOfType(watermark, c("Label", "character"), nullAllowed = TRUE) if (isOfType(watermark, "character")) { @@ -170,8 +170,8 @@ setDefaultWatermark <- function(watermark = NULL) { return(invisible()) } -tlfEnv$logTicks <- 10^seq(-6,6) -tlfEnv$lnTicks <- exp(seq(-6,6)) +tlfEnv$logTicks <- 10^seq(-6, 6) +tlfEnv$lnTicks <- exp(seq(-6, 6)) #' @title setDefaultLogTicks #' @description Set default values for log ticks diff --git a/R/utilities-axis.R b/R/utilities-axis.R index 011887de..dec87e80 100644 --- a/R/utilities-axis.R +++ b/R/utilities-axis.R @@ -23,7 +23,7 @@ #' Scaling$time #' # Date scale for POSIXlt or POSIXct data #' Scaling$date -#' +#' Scaling <- enum(c( "lin", "log", diff --git a/R/utilities-background.R b/R/utilities-background.R index 2382a5e0..01071e50 100644 --- a/R/utilities-background.R +++ b/R/utilities-background.R @@ -8,12 +8,12 @@ #' @param size Optional numeric values defining the size of the grid. #' @return A `ggplot` object #' @export -#' @examples +#' @examples #' # Set grid of a scatter plot #' p <- addScatter(x = c(1, 2, 1, 2, 3), y = c(5, 0, 2, 3, 4)) -#' +#' #' setGrid(p, color = "red", linetype = "dotted") -#' +#' setGrid <- function(plotObject, color = NULL, linetype = NULL, @@ -41,12 +41,12 @@ setGrid <- function(plotObject, #' @inheritParams setGrid #' @return A `ggplot` object #' @export -#' @examples +#' @examples #' # Set x grid of a scatter plot #' p <- addScatter(x = c(1, 2, 1, 2, 3), y = c(5, 0, 2, 3, 4)) -#' +#' #' setXGrid(p, color = "red", linetype = "dotted") -#' +#' setXGrid <- function(plotObject, color = NULL, linetype = NULL, @@ -73,12 +73,12 @@ setXGrid <- function(plotObject, #' @inheritParams setGrid #' @return A `ggplot` object #' @export -#' @examples +#' @examples #' # Set y grid of a scatter #' p <- addScatter(x = c(1, 2, 1, 2, 3), y = c(5, 0, 2, 3, 4)) -#' +#' #' setYGrid(p, color = "red", linetype = "dotted") -#' +#' setYGrid <- function(plotObject, color = NULL, linetype = NULL, @@ -112,12 +112,12 @@ setYGrid <- function(plotObject, #' @param size Optional numeric values defining the size of the background frame. #' @return A `ggplot` object #' @export -#' @examples +#' @examples #' # Set background of a scatter plot #' p <- addScatter(x = c(1, 2, 1, 2, 3), y = c(5, 0, 2, 3, 4)) -#' +#' #' setBackground(p, fill = "yellowgreen", color = "red", linetype = "dotted") -#' +#' setBackground <- function(plotObject, fill = NULL, color = NULL, @@ -147,12 +147,12 @@ setBackground <- function(plotObject, #' @inheritParams setBackground #' @return A `ggplot` object #' @export -#' @examples +#' @examples #' # Set background of a scatter plot #' p <- addScatter(x = c(1, 2, 1, 2, 3), y = c(5, 0, 2, 3, 4)) -#' +#' #' setBackgroundPanelArea(p, fill = "yellowgreen", color = "red", linetype = "dotted") -#' +#' setBackgroundPanelArea <- function(plotObject, fill = NULL, color = NULL, @@ -181,12 +181,12 @@ setBackgroundPanelArea <- function(plotObject, #' @inheritParams setBackground #' @return A `ggplot` object #' @export -#' @examples +#' @examples #' # Set background of a scatter plot #' p <- addScatter(x = c(1, 2, 1, 2, 3), y = c(5, 0, 2, 3, 4)) -#' +#' #' setBackgroundPlotArea(p, fill = "yellowgreen", color = "red", linetype = "dotted") -#' +#' setBackgroundPlotArea <- function(plotObject, fill = NULL, color = NULL, @@ -239,8 +239,8 @@ setBackgroundPlotArea <- function(plotObject, #' #' # Watermark totally opaque #' addWatermark(p, watermarkLabel, alpha = 1) -#' -#' # As multiple layers of watermark: +#' +#' # As multiple layers of watermark: #' p2 <- addWatermark(p, watermarkLabel, alpha = 1) #' addWatermark(p2, "other watermark", color = "red", angle = 90) #' @@ -283,7 +283,7 @@ addWatermark <- function(plotObject, #' @return A `ggplot` object #' @import ggplot2 #' @export -#' @examples +#' @examples #' # Add a watermark to an empty plot #' p <- initializePlot() #' setWatermark(p, "watermark") diff --git a/R/utilities-label.R b/R/utilities-label.R index 811f1491..a528f788 100644 --- a/R/utilities-label.R +++ b/R/utilities-label.R @@ -8,15 +8,15 @@ #' @param caption A character value or `Label` object #' @return A `ggplot` object #' @export -#' @examples +#' @examples #' # Set labels of a scatter plot #' p <- addScatter(x = c(1, 2, 1, 2, 3), y = c(5, 0, 2, 3, 4)) -#' +#' #' setPlotLabels(p, xlabel = "new x label", ylabel = "new y label") -#' +#' #' # Set labels using Label object #' setPlotLabels(p, ylabel = Label$new(text = "red y label", color = "red")) -#' +#' setPlotLabels <- function(plotObject, title = NULL, subtitle = NULL, @@ -79,18 +79,18 @@ asLabel <- function(text = "", font = NULL) { #' Get label with its unit within square brackets when available #' @param label text of axis label #' @param unit Character value corresponding to unit of `label` -#' @return +#' @return #' `label [unit]` or `label` depending if `unit` is `NULL` or `""` #' @export -#' @examples +#' @examples #' getLabelWithUnit("Time", "min") -#' +#' #' getLabelWithUnit("Label without unit") -#' +#' getLabelWithUnit <- function(label, unit = NULL) { if (isTRUE(unit %in% "")) { unit <- NULL } ifNotNull(unit, label <- paste(label, " [", unit, "]", sep = "")) return(label) -} \ No newline at end of file +} diff --git a/R/utilities-legend.R b/R/utilities-legend.R index b15f3629..2f021e9e 100644 --- a/R/utilities-legend.R +++ b/R/utilities-legend.R @@ -93,7 +93,7 @@ setLegendTitle <- function(plotObject, validateIsNumeric(angle, nullAllowed = TRUE) validateIsIncluded(fontFace, FontFaces, nullAllowed = TRUE) validateIsIncluded(align, Alignments, nullAllowed = TRUE) - + # Clone plotConfiguration into a new plot object # Prevents update of R6 class being spread to plotObject newPlotObject <- plotObject @@ -426,7 +426,7 @@ CaptionProperties <- enum(c( #' @keywords internal createPlotLegendPosition <- function(position) { validateIsIncluded(position, LegendPositions) - + listOfLegendPositions <- list( none = list(xPosition = "none", xJustification = NULL, yPosition = NULL, yJustification = NULL), insideTop = list(xPosition = 0.5, xJustification = 0.5, yPosition = 0.975, yJustification = 1), diff --git a/R/utilities-mapping.R b/R/utilities-mapping.R index 94285605..6866e1cb 100644 --- a/R/utilities-mapping.R +++ b/R/utilities-mapping.R @@ -245,7 +245,7 @@ smartMapping <- function(data) { dataMappingLabel <- function(mapping = NULL, metaData = NULL) { label <- NULL ifNotNull(mapping, label <- getLabelWithUnit(metaData[[mapping]]$dimension, metaData[[mapping]]$unit)) - + return(label) } @@ -326,4 +326,3 @@ getAggregatedData <- function(data, return(aggregatedData) } - diff --git a/R/utilities-theme.R b/R/utilities-theme.R index 48f5485e..38ac30f7 100644 --- a/R/utilities-theme.R +++ b/R/utilities-theme.R @@ -9,13 +9,13 @@ loadThemeFromJson <- function(jsonFile) { # Get the content of json file and define lists of its properties themeContent <- jsonlite::fromJSON(jsonFile) themeProperties <- names(themeContent) - + # Define default `Theme` properties, properties defined in json will overwrite those fonts <- ThemeFont$new() background <- ThemeBackground$new() aestheticMaps <- ThemeAestheticMaps$new() plotConfigurations <- ThemePlotConfigurations$new() - + for (themeProperty in themeProperties) { if (!isIncluded(themeProperty, c("fonts", "background", "aestheticMaps", "plotConfigurations"))) { next @@ -45,7 +45,7 @@ loadThemeFromJson <- function(jsonFile) { background$legendPosition <- themeContent$background$legendPosition background$legendTitle <- themeContent$background$legendTitle } - + return(Theme$new( fonts = fonts, background = background, @@ -64,7 +64,7 @@ saveThemeToJson <- function(jsonFile, theme = NULL) { # Check that theme is a Theme validateIsOfType(theme, "Theme", nullAllowed = TRUE) validateIsString(jsonFile) - + if (isEmpty(theme)) { theme <- tlfEnv$currentTheme } @@ -75,7 +75,7 @@ saveThemeToJson <- function(jsonFile, theme = NULL) { #' @title asThemeAestheticSelections #' @description #' Convert a list into a `ThemeAestheticSelections` object -#' @param themeSelectionObject +#' @param themeSelectionObject #' A `ThemeAestheticSelections` or a list that include values for selecting aesthetic properties #' @keywords internal asThemeAestheticSelections <- function(themeSelectionObject) { @@ -84,7 +84,7 @@ asThemeAestheticSelections <- function(themeSelectionObject) { } newThemeAestheticSelections <- ThemeAestheticSelections$new() setNewThemeSelectionExpression <- parse(text = paste0( - "newThemeAestheticSelections$", names(themeSelectionObject), + "newThemeAestheticSelections$", names(themeSelectionObject), "<- themeSelectionObject$", names(themeSelectionObject) )) eval(setNewThemeSelectionExpression) @@ -97,21 +97,31 @@ asThemeAestheticSelections <- function(themeSelectionObject) { #' @param plotConfiguration `PlotConfigurations` object #' @param propertyName Name of property. One `lines`, `points`, `ribbons` or `errorbars` #' @keywords internal -getThemePropertyFor <- function(plotConfiguration, propertyName = NULL){ - # Get theme property matching the plotConfiguration +getThemePropertyFor <- function(plotConfiguration, propertyName = NULL) { + # Get theme property matching the plotConfiguration plotName <- gsub(pattern = "PlotConfiguration", replacement = "", class(plotConfiguration)[1]) # Simple PlotConfiguration are associated with atom plot properties - if(isIncluded(plotName, "")){ + if (isIncluded(plotName, "")) { # Get theme property matching the atom - plotName <- switch(propertyName, lines = "addLine", ribbons = "addRibbon", points ="addScatter", errorbars = "addErrorbar") + plotName <- switch(propertyName, + lines = "addLine", + ribbons = "addRibbon", + points = "addScatter", + errorbars = "addErrorbar" + ) themeProperty <- asThemeAestheticSelections(tlfEnv$currentTheme$plotConfigurations[[plotName]]) return(themeProperty$clone(deep = TRUE)) } # Complex PlotConfiguration are associated with molecule plot properties plotName <- paste0("plot", plotName) # If property undefined in theme, use equivalent atom plot property - if(isEmpty(tlfEnv$currentTheme$plotConfigurations[[plotName]][[propertyName]])){ - plotName <- switch(propertyName, lines = "addLine", ribbons = "addRibbon", points ="addScatter", errorbars = "addErrorbar") + if (isEmpty(tlfEnv$currentTheme$plotConfigurations[[plotName]][[propertyName]])) { + plotName <- switch(propertyName, + lines = "addLine", + ribbons = "addRibbon", + points = "addScatter", + errorbars = "addErrorbar" + ) themeProperty <- asThemeAestheticSelections(tlfEnv$currentTheme$plotConfigurations[[plotName]]) return(themeProperty$clone(deep = TRUE)) } @@ -138,7 +148,7 @@ useTheme <- function(theme) { #' @export #' @examples #' useTemplateTheme() -#' addScatter(x = seq(1,10), y = rnorm(10)) +#' addScatter(x = seq(1, 10), y = rnorm(10)) useTemplateTheme <- function() { useTheme(loadThemeFromJson(system.file("themes", "template-theme.json", package = "tlf"))) } @@ -147,9 +157,9 @@ useTemplateTheme <- function() { #' @description #' Set default Matlab theme to be used as the current default of the tlf environment #' @export -#' @examples +#' @examples #' useMatlabTheme() -#' addScatter(x = seq(1,10), y = rnorm(10)) +#' addScatter(x = seq(1, 10), y = rnorm(10)) useMatlabTheme <- function() { useTheme(loadThemeFromJson(system.file("themes", "matlab-theme.json", package = "tlf"))) } @@ -158,9 +168,9 @@ useMatlabTheme <- function() { #' @description #' Set default Matlab theme to be used as the current default of the tlf environment #' @export -#' @examples +#' @examples #' useDarkTheme() -#' addScatter(x = seq(1,10), y = rnorm(10)) +#' addScatter(x = seq(1, 10), y = rnorm(10)) useDarkTheme <- function() { useTheme(loadThemeFromJson(system.file("themes", "dark-theme.json", package = "tlf"))) } @@ -169,9 +179,9 @@ useDarkTheme <- function() { #' @description #' Set default Excel theme to be used as the current default of the tlf environment #' @export -#' @examples +#' @examples #' useExcelTheme() -#' addScatter(x = seq(1,10), y = rnorm(10)) +#' addScatter(x = seq(1, 10), y = rnorm(10)) useExcelTheme <- function() { useTheme(loadThemeFromJson(system.file("themes", "excel-theme.json", package = "tlf"))) } @@ -180,9 +190,9 @@ useExcelTheme <- function() { #' @description #' Set default HighChart theme to be used as the current default of the tlf environment #' @export -#' @examples +#' @examples #' useHighChartTheme() -#' addScatter(x = seq(1,10), y = rnorm(10)) +#' addScatter(x = seq(1, 10), y = rnorm(10)) useHighChartTheme <- function() { useTheme(loadThemeFromJson(system.file("themes", "hc-theme.json", package = "tlf"))) } @@ -191,9 +201,9 @@ useHighChartTheme <- function() { #' @description #' Set default minimal theme to be used as the current default of the tlf environment #' @export -#' @examples +#' @examples #' useMinimalTheme() -#' addScatter(x = seq(1,10), y = rnorm(10)) +#' addScatter(x = seq(1, 10), y = rnorm(10)) useMinimalTheme <- function() { useTheme(loadThemeFromJson(system.file("themes", "minimal-theme.json", package = "tlf"))) } diff --git a/R/utils.R b/R/utils.R index bca55518..e6d2d5fb 100644 --- a/R/utils.R +++ b/R/utils.R @@ -42,4 +42,4 @@ ifIncluded <- function(x, y, outputIfIncluded, outputIfNotIncluded = NULL) { # The curretnTheme is defined here: after the definition of %||% tlfEnv$currentTheme <- Theme$new() # Default theme is minimal when package is loaded -useMinimalTheme() \ No newline at end of file +useMinimalTheme() diff --git a/man/AggregationInput.Rd b/man/AggregationInput.Rd index 98322832..44ea50e0 100644 --- a/man/AggregationInput.Rd +++ b/man/AggregationInput.Rd @@ -23,13 +23,13 @@ that will be used as variable name of the aggregation} \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{AggregationInput$new()}} -\item \href{#method-clone}{\code{AggregationInput$clone()}} +\item \href{#method-AggregationInput-new}{\code{AggregationInput$new()}} +\item \href{#method-AggregationInput-clone}{\code{AggregationInput$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AggregationInput-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{AggregationInput} object \subsection{Usage}{ @@ -60,8 +60,8 @@ A new \code{AggregationInput} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AggregationInput-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/AggregationSummary.Rd b/man/AggregationSummary.Rd index 5a2e939d..d29da1c7 100644 --- a/man/AggregationSummary.Rd +++ b/man/AggregationSummary.Rd @@ -43,15 +43,15 @@ The summary statistic column name in each data.frame is the same as the name of \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{AggregationSummary$new()}} -\item \href{#method-applyAggregationFunctions}{\code{AggregationSummary$applyAggregationFunctions()}} -\item \href{#method-generateAggregatedValues}{\code{AggregationSummary$generateAggregatedValues()}} -\item \href{#method-clone}{\code{AggregationSummary$clone()}} +\item \href{#method-AggregationSummary-new}{\code{AggregationSummary$new()}} +\item \href{#method-AggregationSummary-applyAggregationFunctions}{\code{AggregationSummary$applyAggregationFunctions()}} +\item \href{#method-AggregationSummary-generateAggregatedValues}{\code{AggregationSummary$generateAggregatedValues()}} +\item \href{#method-AggregationSummary-clone}{\code{AggregationSummary$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AggregationSummary-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{AggregationSummary} object \subsection{Usage}{ @@ -99,8 +99,8 @@ A new \code{AggregationSummary} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-applyAggregationFunctions}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AggregationSummary-applyAggregationFunctions}{}}} \subsection{Method \code{applyAggregationFunctions()}}{ Apply aggregation functions on \code{x} \subsection{Usage}{ @@ -119,8 +119,8 @@ A list or vector of aggregated values } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-generateAggregatedValues}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AggregationSummary-generateAggregatedValues}{}}} \subsection{Method \code{generateAggregatedValues()}}{ Generate aggregated values \subsection{Usage}{ @@ -132,8 +132,8 @@ A list or vector of aggregated values } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AggregationSummary-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/AxisConfiguration.Rd b/man/AxisConfiguration.Rd index bf9531aa..3f235a7e 100644 --- a/man/AxisConfiguration.Rd +++ b/man/AxisConfiguration.Rd @@ -30,17 +30,17 @@ If \code{FALSE}, some space between data and axis is kept} \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{AxisConfiguration$new()}} -\item \href{#method-ggplotScale}{\code{AxisConfiguration$ggplotScale()}} -\item \href{#method-ggplotExpansion}{\code{AxisConfiguration$ggplotExpansion()}} -\item \href{#method-prettyTicks}{\code{AxisConfiguration$prettyTicks()}} -\item \href{#method-prettyTickLabels}{\code{AxisConfiguration$prettyTickLabels()}} -\item \href{#method-clone}{\code{AxisConfiguration$clone()}} +\item \href{#method-AxisConfiguration-new}{\code{AxisConfiguration$new()}} +\item \href{#method-AxisConfiguration-ggplotScale}{\code{AxisConfiguration$ggplotScale()}} +\item \href{#method-AxisConfiguration-ggplotExpansion}{\code{AxisConfiguration$ggplotExpansion()}} +\item \href{#method-AxisConfiguration-prettyTicks}{\code{AxisConfiguration$prettyTicks()}} +\item \href{#method-AxisConfiguration-prettyTickLabels}{\code{AxisConfiguration$prettyTickLabels()}} +\item \href{#method-AxisConfiguration-clone}{\code{AxisConfiguration$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AxisConfiguration-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{AxisConfiguration} object \subsection{Usage}{ @@ -79,8 +79,8 @@ A new \code{AxisConfiguration} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ggplotScale}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AxisConfiguration-ggplotScale}{}}} \subsection{Method \code{ggplotScale()}}{ Get the \code{ggplot2} actual \code{trans} name of scale \subsection{Usage}{ @@ -92,8 +92,8 @@ A character included in \code{ggplot2} available \code{trans} names } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ggplotExpansion}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AxisConfiguration-ggplotExpansion}{}}} \subsection{Method \code{ggplotExpansion()}}{ Get the \code{ggplot2} actual function for expansion \subsection{Usage}{ @@ -105,8 +105,8 @@ A \code{ggplot2} function } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-prettyTicks}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AxisConfiguration-prettyTicks}{}}} \subsection{Method \code{prettyTicks()}}{ Get tick values for pretty default log plots \subsection{Usage}{ @@ -118,8 +118,8 @@ User defined tick values or tlf default ticks } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-prettyTickLabels}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AxisConfiguration-prettyTickLabels}{}}} \subsection{Method \code{prettyTickLabels()}}{ Get tick labels for pretty default log plots \subsection{Usage}{ @@ -131,8 +131,8 @@ User defined tick labels or tlf default ticklabels } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AxisConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/BackgroundConfiguration.Rd b/man/BackgroundConfiguration.Rd index 79c73f4f..75e4b8f9 100644 --- a/man/BackgroundConfiguration.Rd +++ b/man/BackgroundConfiguration.Rd @@ -28,14 +28,14 @@ R6 class defining the configuration of background \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{BackgroundConfiguration$new()}} -\item \href{#method-updatePlot}{\code{BackgroundConfiguration$updatePlot()}} -\item \href{#method-clone}{\code{BackgroundConfiguration$clone()}} +\item \href{#method-BackgroundConfiguration-new}{\code{BackgroundConfiguration$new()}} +\item \href{#method-BackgroundConfiguration-updatePlot}{\code{BackgroundConfiguration$updatePlot()}} +\item \href{#method-BackgroundConfiguration-clone}{\code{BackgroundConfiguration$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-BackgroundConfiguration-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{BackgroundConfiguration} object \subsection{Usage}{ @@ -74,8 +74,8 @@ A new \code{BackgroundConfiguration} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-updatePlot}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-BackgroundConfiguration-updatePlot}{}}} \subsection{Method \code{updatePlot()}}{ Update background a \code{ggplot} object from \code{BackgroundConfiguration} properties \subsection{Usage}{ @@ -94,8 +94,8 @@ A \code{ggplot} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-BackgroundConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/BackgroundElement.Rd b/man/BackgroundElement.Rd index 35ede89c..be5ccf40 100644 --- a/man/BackgroundElement.Rd +++ b/man/BackgroundElement.Rd @@ -22,14 +22,14 @@ R6 class defining the properties of background elements \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{BackgroundElement$new()}} -\item \href{#method-createPlotElement}{\code{BackgroundElement$createPlotElement()}} -\item \href{#method-clone}{\code{BackgroundElement$clone()}} +\item \href{#method-BackgroundElement-new}{\code{BackgroundElement$new()}} +\item \href{#method-BackgroundElement-createPlotElement}{\code{BackgroundElement$createPlotElement()}} +\item \href{#method-BackgroundElement-clone}{\code{BackgroundElement$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-BackgroundElement-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{BackgroundElement} object \subsection{Usage}{ @@ -54,8 +54,8 @@ A new \code{BackgroundElement} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-createPlotElement}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-BackgroundElement-createPlotElement}{}}} \subsection{Method \code{createPlotElement()}}{ Create a \code{ggplot2::element_rect} directly usable by \code{ggplot2::theme}. \subsection{Usage}{ @@ -85,8 +85,8 @@ An \code{element_rect} object. } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-BackgroundElement-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/BoxWhiskerDataMapping.Rd b/man/BoxWhiskerDataMapping.Rd index 9d68e706..e0d24012 100644 --- a/man/BoxWhiskerDataMapping.Rd +++ b/man/BoxWhiskerDataMapping.Rd @@ -40,22 +40,22 @@ calculated on \code{data} to obtain box whiskers} \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{BoxWhiskerDataMapping$new()}} -\item \href{#method-getBoxWhiskerLimits}{\code{BoxWhiskerDataMapping$getBoxWhiskerLimits()}} -\item \href{#method-getOutliers}{\code{BoxWhiskerDataMapping$getOutliers()}} -\item \href{#method-clone}{\code{BoxWhiskerDataMapping$clone()}} -} -} -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/XYGDataMapping.html#method-checkMapData}{\code{tlf::XYGDataMapping$checkMapData()}}\out{} -} -\out{
} -} +\item \href{#method-BoxWhiskerDataMapping-new}{\code{BoxWhiskerDataMapping$new()}} +\item \href{#method-BoxWhiskerDataMapping-getBoxWhiskerLimits}{\code{BoxWhiskerDataMapping$getBoxWhiskerLimits()}} +\item \href{#method-BoxWhiskerDataMapping-getOutliers}{\code{BoxWhiskerDataMapping$getOutliers()}} +\item \href{#method-BoxWhiskerDataMapping-clone}{\code{BoxWhiskerDataMapping$clone()}} +} +} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-BoxWhiskerDataMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{BoxWhiskerDataMapping} object \subsection{Usage}{ @@ -111,8 +111,8 @@ A new \code{BoxWhiskerDataMapping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-getBoxWhiskerLimits}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-BoxWhiskerDataMapping-getBoxWhiskerLimits}{}}} \subsection{Method \code{getBoxWhiskerLimits()}}{ Get a data.frame with box-whisker limit by group \subsection{Usage}{ @@ -131,8 +131,8 @@ A data.frame with \code{ymin}, \code{lower}, \code{middle}, \code{upper}, \code{ } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-getOutliers}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-BoxWhiskerDataMapping-getOutliers}{}}} \subsection{Method \code{getOutliers()}}{ Get a data.frame flagging outliers \subsection{Usage}{ @@ -152,8 +152,8 @@ Values not flagged are \code{NA} in the outliers variables } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-BoxWhiskerDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/BoxWhiskerPlotConfiguration.Rd b/man/BoxWhiskerPlotConfiguration.Rd index 127c5727..344f77ce 100644 --- a/man/BoxWhiskerPlotConfiguration.Rd +++ b/man/BoxWhiskerPlotConfiguration.Rd @@ -37,19 +37,19 @@ Other PlotConfiguration classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{BoxWhiskerPlotConfiguration$new()}} -\item \href{#method-clone}{\code{BoxWhiskerPlotConfiguration$clone()}} +\item \href{#method-BoxWhiskerPlotConfiguration-new}{\code{BoxWhiskerPlotConfiguration$new()}} +\item \href{#method-BoxWhiskerPlotConfiguration-clone}{\code{BoxWhiskerPlotConfiguration$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -} -\out{
} -} +\if{html}{\out{ +
Inherited methods +
    +
+
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-BoxWhiskerPlotConfiguration-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{BoxWhiskerPlotConfiguration} object \subsection{Usage}{ @@ -70,8 +70,8 @@ A new \code{BoxWhiskerPlotConfiguration} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-BoxWhiskerPlotConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/DDIRatioDataMapping.Rd b/man/DDIRatioDataMapping.Rd index 9a58c240..bde462bd 100644 --- a/man/DDIRatioDataMapping.Rd +++ b/man/DDIRatioDataMapping.Rd @@ -40,20 +40,20 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{DDIRatioDataMapping$new()}} -\item \href{#method-clone}{\code{DDIRatioDataMapping$clone()}} +\item \href{#method-DDIRatioDataMapping-new}{\code{DDIRatioDataMapping$new()}} +\item \href{#method-DDIRatioDataMapping-clone}{\code{DDIRatioDataMapping$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/PKRatioDataMapping.html#method-checkMapData}{\code{tlf::PKRatioDataMapping$checkMapData()}}\out{} -} -\out{
} -} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-DDIRatioDataMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{DDIRatioDataMapping} object \subsection{Usage}{ @@ -87,8 +87,8 @@ A new \code{DDIRatioDataMapping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-DDIRatioDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/DDIRatioPlotConfiguration.Rd b/man/DDIRatioPlotConfiguration.Rd index 6cebdddf..6e689a3f 100644 --- a/man/DDIRatioPlotConfiguration.Rd +++ b/man/DDIRatioPlotConfiguration.Rd @@ -34,19 +34,19 @@ Other PlotConfiguration classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-clone}{\code{DDIRatioPlotConfiguration$clone()}} +\item \href{#method-DDIRatioPlotConfiguration-clone}{\code{DDIRatioPlotConfiguration$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/PlotConfiguration.html#method-initialize}{\code{tlf::PlotConfiguration$initialize()}}\out{} -} -\out{
} -} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-DDIRatioPlotConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/ExportConfiguration.Rd b/man/ExportConfiguration.Rd index 952bfaf1..bf2169ae 100644 --- a/man/ExportConfiguration.Rd +++ b/man/ExportConfiguration.Rd @@ -11,6 +11,9 @@ R6 class defining properties for saving a \code{ggplot} object \describe{ \item{\code{name}}{character defining the name of the file to be saved (without extension)} +\item{\code{path}}{Path of the directory to save plot to: path and filename are +combined to create the fully qualified file name. Defaults to the working directory.} + \item{\code{format}}{character defining the format of the file to be saved} \item{\code{width}}{numeric values defining the width in \code{units} of the plot dimensions after saving} @@ -26,21 +29,22 @@ R6 class defining properties for saving a \code{ggplot} object \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{ExportConfiguration$new()}} -\item \href{#method-print}{\code{ExportConfiguration$print()}} -\item \href{#method-getFileName}{\code{ExportConfiguration$getFileName()}} -\item \href{#method-savePlot}{\code{ExportConfiguration$savePlot()}} -\item \href{#method-convertPixels}{\code{ExportConfiguration$convertPixels()}} -\item \href{#method-clone}{\code{ExportConfiguration$clone()}} +\item \href{#method-ExportConfiguration-new}{\code{ExportConfiguration$new()}} +\item \href{#method-ExportConfiguration-print}{\code{ExportConfiguration$print()}} +\item \href{#method-ExportConfiguration-getFileName}{\code{ExportConfiguration$getFileName()}} +\item \href{#method-ExportConfiguration-savePlot}{\code{ExportConfiguration$savePlot()}} +\item \href{#method-ExportConfiguration-convertPixels}{\code{ExportConfiguration$convertPixels()}} +\item \href{#method-ExportConfiguration-clone}{\code{ExportConfiguration$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ExportConfiguration-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{ExportConfiguration} object \subsection{Usage}{ \if{html}{\out{
}}\preformatted{ExportConfiguration$new( + path = NULL, name = NULL, format = NULL, width = NULL, @@ -53,6 +57,9 @@ Create a new \code{ExportConfiguration} object \subsection{Arguments}{ \if{html}{\out{
}} \describe{ +\item{\code{path}}{Path of the directory to save plot to: path and filename are +combined to create the fully qualified file name. Defaults to the working directory.} + \item{\code{name}}{character defining the name of the file to be saved (without extension)} \item{\code{format}}{character defining the format of the file to be saved.} @@ -72,8 +79,8 @@ A new \code{ExportConfiguration} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-print}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ExportConfiguration-print}{}}} \subsection{Method \code{print()}}{ Print properties of export configuration \subsection{Usage}{ @@ -85,8 +92,8 @@ Export configuration properties } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-getFileName}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ExportConfiguration-getFileName}{}}} \subsection{Method \code{getFileName()}}{ Print the default exported file name from the export configuration \subsection{Usage}{ @@ -98,8 +105,8 @@ Default file name } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-savePlot}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ExportConfiguration-savePlot}{}}} \subsection{Method \code{savePlot()}}{ Save/Export a plot \subsection{Usage}{ @@ -120,8 +127,8 @@ The file name of the exported plot } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-convertPixels}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ExportConfiguration-convertPixels}{}}} \subsection{Method \code{convertPixels()}}{ If unit is in pixels, convert all export dimensions to inches to keep compatibility with older versions of ggplot2 \subsection{Usage}{ @@ -130,8 +137,8 @@ If unit is in pixels, convert all export dimensions to inches to keep compatibil } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ExportConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/Font.Rd b/man/Font.Rd index 4a1a2ea9..8b5f3d42 100644 --- a/man/Font.Rd +++ b/man/Font.Rd @@ -26,14 +26,14 @@ R6 class defining font properties \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{Font$new()}} -\item \href{#method-createPlotFont}{\code{Font$createPlotFont()}} -\item \href{#method-clone}{\code{Font$clone()}} +\item \href{#method-Font-new}{\code{Font$new()}} +\item \href{#method-Font-createPlotFont}{\code{Font$createPlotFont()}} +\item \href{#method-Font-clone}{\code{Font$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Font-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{Font} object. Default font properties are defined directly in the object field, @@ -71,8 +71,8 @@ A new \code{Font} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-createPlotFont}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Font-createPlotFont}{}}} \subsection{Method \code{createPlotFont()}}{ Create a \code{ggplot2::element_text} directly convertible by \code{ggplot2::theme}. \subsection{Usage}{ @@ -108,8 +108,8 @@ An \code{element_text} object. } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Font-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/GroupMapping.Rd b/man/GroupMapping.Rd index 7857dd47..08e3fc2c 100644 --- a/man/GroupMapping.Rd +++ b/man/GroupMapping.Rd @@ -41,13 +41,13 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{GroupMapping$new()}} -\item \href{#method-clone}{\code{GroupMapping$clone()}} +\item \href{#method-GroupMapping-new}{\code{GroupMapping$new()}} +\item \href{#method-GroupMapping-clone}{\code{GroupMapping$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-GroupMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{GroupMapping} object \subsection{Usage}{ @@ -80,8 +80,8 @@ A new \code{GroupMapping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-GroupMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/Grouping.Rd b/man/Grouping.Rd index e74c580f..257737a3 100644 --- a/man/Grouping.Rd +++ b/man/Grouping.Rd @@ -35,14 +35,14 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{Grouping$new()}} -\item \href{#method-getCaptions}{\code{Grouping$getCaptions()}} -\item \href{#method-clone}{\code{Grouping$clone()}} +\item \href{#method-Grouping-new}{\code{Grouping$new()}} +\item \href{#method-Grouping-getCaptions}{\code{Grouping$getCaptions()}} +\item \href{#method-Grouping-clone}{\code{Grouping$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Grouping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{Grouping} object \subsection{Usage}{ @@ -63,8 +63,8 @@ A new \code{Grouping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-getCaptions}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Grouping-getCaptions}{}}} \subsection{Method \code{getCaptions()}}{ Get the caption associated to each \code{group} \subsection{Usage}{ @@ -85,8 +85,8 @@ A vector of characters containing the captions associated to each \code{group} o } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Grouping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/HistogramDataMapping.Rd b/man/HistogramDataMapping.Rd index d6c003a9..609ec0c8 100644 --- a/man/HistogramDataMapping.Rd +++ b/man/HistogramDataMapping.Rd @@ -43,20 +43,20 @@ Only 2 distributions are currently available: \code{"normal"} and \code{"logNorm \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{HistogramDataMapping$new()}} -\item \href{#method-clone}{\code{HistogramDataMapping$clone()}} +\item \href{#method-HistogramDataMapping-new}{\code{HistogramDataMapping$new()}} +\item \href{#method-HistogramDataMapping-clone}{\code{HistogramDataMapping$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/XYGDataMapping.html#method-checkMapData}{\code{tlf::XYGDataMapping$checkMapData()}}\out{} -} -\out{
} -} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-HistogramDataMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{HistogramDataMapping} object \subsection{Usage}{ @@ -90,8 +90,8 @@ A new \code{HistogramDataMapping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-HistogramDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/HistogramPlotConfiguration.Rd b/man/HistogramPlotConfiguration.Rd index 36a63c08..7a8d0a7c 100644 --- a/man/HistogramPlotConfiguration.Rd +++ b/man/HistogramPlotConfiguration.Rd @@ -23,19 +23,19 @@ Other PlotConfiguration classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{HistogramPlotConfiguration$new()}} -\item \href{#method-clone}{\code{HistogramPlotConfiguration$clone()}} +\item \href{#method-HistogramPlotConfiguration-new}{\code{HistogramPlotConfiguration$new()}} +\item \href{#method-HistogramPlotConfiguration-clone}{\code{HistogramPlotConfiguration$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -} -\out{
} -} +\if{html}{\out{ +
Inherited methods +
    +
+
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-HistogramPlotConfiguration-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{HistogramPlotConfiguration} object \subsection{Usage}{ @@ -56,8 +56,8 @@ A new \code{HistogramPlotConfiguration} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-HistogramPlotConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/Label.Rd b/man/Label.Rd index 400f4921..de506096 100644 --- a/man/Label.Rd +++ b/man/Label.Rd @@ -18,14 +18,14 @@ R6 class defining \code{text} and \code{font} of labels \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{Label$new()}} -\item \href{#method-createPlotFont}{\code{Label$createPlotFont()}} -\item \href{#method-clone}{\code{Label$clone()}} +\item \href{#method-Label-new}{\code{Label$new()}} +\item \href{#method-Label-createPlotFont}{\code{Label$createPlotFont()}} +\item \href{#method-Label-clone}{\code{Label$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Label-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{Label} object. \subsection{Usage}{ @@ -67,8 +67,8 @@ A new \code{Label} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-createPlotFont}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Label-createPlotFont}{}}} \subsection{Method \code{createPlotFont()}}{ Create a \code{ggplot2::element_text} directly convertible by \code{ggplot2::theme}. \subsection{Usage}{ @@ -104,8 +104,8 @@ An \code{element_text} or \code{element_blank}object. } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Label-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/LabelConfiguration.Rd b/man/LabelConfiguration.Rd index ff3ff79a..afa2e194 100644 --- a/man/LabelConfiguration.Rd +++ b/man/LabelConfiguration.Rd @@ -24,14 +24,14 @@ R6 class defining the configuration of the labels of a \code{ggplot} object \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{LabelConfiguration$new()}} -\item \href{#method-updatePlot}{\code{LabelConfiguration$updatePlot()}} -\item \href{#method-clone}{\code{LabelConfiguration$clone()}} +\item \href{#method-LabelConfiguration-new}{\code{LabelConfiguration$new()}} +\item \href{#method-LabelConfiguration-updatePlot}{\code{LabelConfiguration$updatePlot()}} +\item \href{#method-LabelConfiguration-clone}{\code{LabelConfiguration$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-LabelConfiguration-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{LabelConfiguration} object \subsection{Usage}{ @@ -64,8 +64,8 @@ A new \code{LabelConfiguration} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-updatePlot}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-LabelConfiguration-updatePlot}{}}} \subsection{Method \code{updatePlot()}}{ Update labels of a \code{ggplot} object and their properties \subsection{Usage}{ @@ -84,8 +84,8 @@ A \code{ggplot} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-LabelConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/LegendConfiguration.Rd b/man/LegendConfiguration.Rd index 16a1b781..96f46ea6 100644 --- a/man/LegendConfiguration.Rd +++ b/man/LegendConfiguration.Rd @@ -24,14 +24,14 @@ R6 class defining the legend configuration of a \code{ggplot} object \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{LegendConfiguration$new()}} -\item \href{#method-updatePlot}{\code{LegendConfiguration$updatePlot()}} -\item \href{#method-clone}{\code{LegendConfiguration$clone()}} +\item \href{#method-LegendConfiguration-new}{\code{LegendConfiguration$new()}} +\item \href{#method-LegendConfiguration-updatePlot}{\code{LegendConfiguration$updatePlot()}} +\item \href{#method-LegendConfiguration-clone}{\code{LegendConfiguration$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-LegendConfiguration-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{LegendConfiguration} object \subsection{Usage}{ @@ -64,8 +64,8 @@ A new \code{LegendConfiguration} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-updatePlot}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-LegendConfiguration-updatePlot}{}}} \subsection{Method \code{updatePlot()}}{ Update legend configuration on a \code{ggplot} object \subsection{Usage}{ @@ -84,8 +84,8 @@ A \code{ggplot} object with updated axis properties } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-LegendConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/LineElement.Rd b/man/LineElement.Rd index a845586f..dca44198 100644 --- a/man/LineElement.Rd +++ b/man/LineElement.Rd @@ -12,20 +12,20 @@ R6 class defining the properties of background line elements \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-createPlotElement}{\code{LineElement$createPlotElement()}} -\item \href{#method-clone}{\code{LineElement$clone()}} +\item \href{#method-LineElement-createPlotElement}{\code{LineElement$createPlotElement()}} +\item \href{#method-LineElement-clone}{\code{LineElement$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/BackgroundElement.html#method-initialize}{\code{tlf::BackgroundElement$initialize()}}\out{} -} -\out{
} -} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-createPlotElement}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-LineElement-createPlotElement}{}}} \subsection{Method \code{createPlotElement()}}{ Create a \code{ggplot2::element_line} directly usable by \code{ggplot2::theme}. \subsection{Usage}{ @@ -48,8 +48,8 @@ An \code{element_line} object. } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-LineElement-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/ObsVsPredDataMapping.Rd b/man/ObsVsPredDataMapping.Rd index 794df574..965fbe00 100644 --- a/man/ObsVsPredDataMapping.Rd +++ b/man/ObsVsPredDataMapping.Rd @@ -36,20 +36,20 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{ObsVsPredDataMapping$new()}} -\item \href{#method-clone}{\code{ObsVsPredDataMapping$clone()}} +\item \href{#method-ObsVsPredDataMapping-new}{\code{ObsVsPredDataMapping$new()}} +\item \href{#method-ObsVsPredDataMapping-clone}{\code{ObsVsPredDataMapping$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/PKRatioDataMapping.html#method-checkMapData}{\code{tlf::PKRatioDataMapping$checkMapData()}}\out{} -} -\out{
} -} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ObsVsPredDataMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{ObsVsPredDataMapping} object \subsection{Usage}{ @@ -77,8 +77,8 @@ A new \code{ObsVsPredDataMapping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ObsVsPredDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/ObsVsPredPlotConfiguration.Rd b/man/ObsVsPredPlotConfiguration.Rd index 2589f588..f2c3f801 100644 --- a/man/ObsVsPredPlotConfiguration.Rd +++ b/man/ObsVsPredPlotConfiguration.Rd @@ -23,19 +23,19 @@ Other PlotConfiguration classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-clone}{\code{ObsVsPredPlotConfiguration$clone()}} +\item \href{#method-ObsVsPredPlotConfiguration-clone}{\code{ObsVsPredPlotConfiguration$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/PlotConfiguration.html#method-initialize}{\code{tlf::PlotConfiguration$initialize()}}\out{} -} -\out{
} -} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ObsVsPredPlotConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/ObservedDataMapping.Rd b/man/ObservedDataMapping.Rd index 2a42f566..20e4ed7b 100644 --- a/man/ObservedDataMapping.Rd +++ b/man/ObservedDataMapping.Rd @@ -42,20 +42,20 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{ObservedDataMapping$new()}} -\item \href{#method-checkMapData}{\code{ObservedDataMapping$checkMapData()}} -\item \href{#method-clone}{\code{ObservedDataMapping$clone()}} +\item \href{#method-ObservedDataMapping-new}{\code{ObservedDataMapping$new()}} +\item \href{#method-ObservedDataMapping-checkMapData}{\code{ObservedDataMapping$checkMapData()}} +\item \href{#method-ObservedDataMapping-clone}{\code{ObservedDataMapping$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -} -\out{
} -} +\if{html}{\out{ +
Inherited methods +
    +
+
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ObservedDataMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{ObservedDataMapping} object \subsection{Usage}{ @@ -107,8 +107,8 @@ A new \code{ObservedDataMapping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-checkMapData}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ObservedDataMapping-checkMapData}{}}} \subsection{Method \code{checkMapData()}}{ Check that \code{data} variables include map variables \subsection{Usage}{ @@ -130,8 +130,8 @@ Dummy variable \code{defaultAes} is necessary to allow further modification of p } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ObservedDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/PKRatioDataMapping.Rd b/man/PKRatioDataMapping.Rd index e67080f0..45080635 100644 --- a/man/PKRatioDataMapping.Rd +++ b/man/PKRatioDataMapping.Rd @@ -38,20 +38,20 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{PKRatioDataMapping$new()}} -\item \href{#method-checkMapData}{\code{PKRatioDataMapping$checkMapData()}} -\item \href{#method-clone}{\code{PKRatioDataMapping$clone()}} +\item \href{#method-PKRatioDataMapping-new}{\code{PKRatioDataMapping$new()}} +\item \href{#method-PKRatioDataMapping-checkMapData}{\code{PKRatioDataMapping$checkMapData()}} +\item \href{#method-PKRatioDataMapping-clone}{\code{PKRatioDataMapping$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -} -\out{
} -} +\if{html}{\out{ +
Inherited methods +
    +
+
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PKRatioDataMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{PKRatioDataMapping} object \subsection{Usage}{ @@ -82,8 +82,8 @@ A new \code{PKRatioDataMapping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-checkMapData}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PKRatioDataMapping-checkMapData}{}}} \subsection{Method \code{checkMapData()}}{ Check that \code{data} variables include map variables \subsection{Usage}{ @@ -105,8 +105,8 @@ Dummy variable \code{defaultAes} is necessary to allow further modification of p } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PKRatioDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/PKRatioPlotConfiguration.Rd b/man/PKRatioPlotConfiguration.Rd index a0365e55..461684f8 100644 --- a/man/PKRatioPlotConfiguration.Rd +++ b/man/PKRatioPlotConfiguration.Rd @@ -30,19 +30,19 @@ Other PlotConfiguration classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-clone}{\code{PKRatioPlotConfiguration$clone()}} +\item \href{#method-PKRatioPlotConfiguration-clone}{\code{PKRatioPlotConfiguration$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/PlotConfiguration.html#method-initialize}{\code{tlf::PlotConfiguration$initialize()}}\out{} -} -\out{
} -} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PKRatioPlotConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/Percentile0-grapes.Rd b/man/Percentile0-grapes.Rd index b46ff473..dc870998 100644 --- a/man/Percentile0-grapes.Rd +++ b/man/Percentile0-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile0\%} i.e. \code{min} value \examples{ # Calculate Percentile0\% `Percentile0\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile1-grapes.Rd b/man/Percentile1-grapes.Rd index f11c69a7..115974d9 100644 --- a/man/Percentile1-grapes.Rd +++ b/man/Percentile1-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile1\%} \examples{ # Calculate Percentile1\% `Percentile1\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile10-grapes.Rd b/man/Percentile10-grapes.Rd index 49f009cf..1a315db2 100644 --- a/man/Percentile10-grapes.Rd +++ b/man/Percentile10-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile10\%} \examples{ # Calculate Percentile10\% `Percentile10\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile100-grapes.Rd b/man/Percentile100-grapes.Rd index 567cba84..73322ce2 100644 --- a/man/Percentile100-grapes.Rd +++ b/man/Percentile100-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile100\%} i.e. \code{max} value \examples{ # Calculate Percentile100\% `Percentile100\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile15-grapes.Rd b/man/Percentile15-grapes.Rd index e7fe9141..e58e0575 100644 --- a/man/Percentile15-grapes.Rd +++ b/man/Percentile15-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile15\%} \examples{ # Calculate Percentile15\% `Percentile15\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile2.5-grapes.Rd b/man/Percentile2.5-grapes.Rd index 947c907d..cefbef22 100644 --- a/man/Percentile2.5-grapes.Rd +++ b/man/Percentile2.5-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile2.5\%} \examples{ # Calculate Percentile2.5\% `Percentile2.5\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile20-grapes.Rd b/man/Percentile20-grapes.Rd index 9b7773c9..31039f2d 100644 --- a/man/Percentile20-grapes.Rd +++ b/man/Percentile20-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile20\%} \examples{ # Calculate Percentile20\% `Percentile20\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile25-grapes-1.5IQR.Rd b/man/Percentile25-grapes-1.5IQR.Rd index 28f0790b..0d1693ee 100644 --- a/man/Percentile25-grapes-1.5IQR.Rd +++ b/man/Percentile25-grapes-1.5IQR.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile25\%-1.5IQR} \examples{ # Calculate Percentile25\%-1.5IQR `Percentile25\%-1.5IQR`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile25-grapes.Rd b/man/Percentile25-grapes.Rd index aec55697..23d53ef9 100644 --- a/man/Percentile25-grapes.Rd +++ b/man/Percentile25-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile25\%} i.e. 1st quartile value \examples{ # Calculate Percentile25\% `Percentile25\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile5-grapes.Rd b/man/Percentile5-grapes.Rd index cc6ff924..f47d526d 100644 --- a/man/Percentile5-grapes.Rd +++ b/man/Percentile5-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile5\%} \examples{ # Calculate Percentile5\% `Percentile5\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile50-grapes.Rd b/man/Percentile50-grapes.Rd index 999e3f12..de4f835f 100644 --- a/man/Percentile50-grapes.Rd +++ b/man/Percentile50-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile50\%} i.e. \code{median} value \examples{ # Calculate Percentile50\% `Percentile50\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile75-grapes-plus-1.5IQR.Rd b/man/Percentile75-grapes-plus-1.5IQR.Rd index a942c963..7f710f3a 100644 --- a/man/Percentile75-grapes-plus-1.5IQR.Rd +++ b/man/Percentile75-grapes-plus-1.5IQR.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile75\%+1.5IQR} \examples{ # Calculate Percentile75\%+1.5IQR `Percentile75\%+1.5IQR`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile75-grapes.Rd b/man/Percentile75-grapes.Rd index 39c235ce..485ee554 100644 --- a/man/Percentile75-grapes.Rd +++ b/man/Percentile75-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile75\%} i.e. 3rd quartile value \examples{ # Calculate Percentile75\% `Percentile75\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile80-grapes.Rd b/man/Percentile80-grapes.Rd index c2683f39..3667caf7 100644 --- a/man/Percentile80-grapes.Rd +++ b/man/Percentile80-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile80\%} \examples{ # Calculate Percentile80\% `Percentile80\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile85-grapes.Rd b/man/Percentile85-grapes.Rd index 6b4a869d..27a777cb 100644 --- a/man/Percentile85-grapes.Rd +++ b/man/Percentile85-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile85\%} \examples{ # Calculate Percentile85\% `Percentile85\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile90-grapes.Rd b/man/Percentile90-grapes.Rd index edba2ae3..5dbf77f3 100644 --- a/man/Percentile90-grapes.Rd +++ b/man/Percentile90-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile90\%} \examples{ # Calculate Percentile90\% `Percentile90\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile95-grapes.Rd b/man/Percentile95-grapes.Rd index 5809b8f8..3191c150 100644 --- a/man/Percentile95-grapes.Rd +++ b/man/Percentile95-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile95\%} \examples{ # Calculate Percentile95\% `Percentile95\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile97.5-grapes.Rd b/man/Percentile97.5-grapes.Rd index 550c29b4..fda4aa0e 100644 --- a/man/Percentile97.5-grapes.Rd +++ b/man/Percentile97.5-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile97.5\%} \examples{ # Calculate Percentile97.5\% `Percentile97.5\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/Percentile99-grapes.Rd b/man/Percentile99-grapes.Rd index 78395ce2..b57e63b5 100644 --- a/man/Percentile99-grapes.Rd +++ b/man/Percentile99-grapes.Rd @@ -18,7 +18,7 @@ Calculate \verb{Percentile99\%} \examples{ # Calculate Percentile99\% `Percentile99\%`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/PlotConfiguration.Rd b/man/PlotConfiguration.Rd index fb00cc5d..8f0f02e8 100644 --- a/man/PlotConfiguration.Rd +++ b/man/PlotConfiguration.Rd @@ -60,13 +60,13 @@ Other PlotConfiguration classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{PlotConfiguration$new()}} -\item \href{#method-clone}{\code{PlotConfiguration$clone()}} +\item \href{#method-PlotConfiguration-new}{\code{PlotConfiguration$new()}} +\item \href{#method-PlotConfiguration-clone}{\code{PlotConfiguration$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PlotConfiguration-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{PlotConfiguration} object \subsection{Usage}{ @@ -187,8 +187,8 @@ A new \code{PlotConfiguration} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PlotConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/PlotGridConfiguration.Rd b/man/PlotGridConfiguration.Rd index e9ac8522..98e074c8 100644 --- a/man/PlotGridConfiguration.Rd +++ b/man/PlotGridConfiguration.Rd @@ -104,14 +104,14 @@ in the grid. Will get repeated to match the dimensions of the grid.} \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{PlotGridConfiguration$new()}} -\item \href{#method-addPlots}{\code{PlotGridConfiguration$addPlots()}} -\item \href{#method-clone}{\code{PlotGridConfiguration$clone()}} +\item \href{#method-PlotGridConfiguration-new}{\code{PlotGridConfiguration$new()}} +\item \href{#method-PlotGridConfiguration-addPlots}{\code{PlotGridConfiguration$addPlots()}} +\item \href{#method-PlotGridConfiguration-clone}{\code{PlotGridConfiguration$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PlotGridConfiguration-new}{}}} \subsection{Method \code{new()}}{ Create an instance of \code{PlotGridConfiguration} class. \subsection{Usage}{ @@ -130,8 +130,8 @@ A \code{PlotGridConfiguration} object. } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-addPlots}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PlotGridConfiguration-addPlots}{}}} \subsection{Method \code{addPlots()}}{ Add a plot object. \subsection{Usage}{ @@ -174,8 +174,8 @@ length(myPlotGrid$plotList) } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PlotGridConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/RangeDataMapping.Rd b/man/RangeDataMapping.Rd index 615348c1..b6c7c2bd 100644 --- a/man/RangeDataMapping.Rd +++ b/man/RangeDataMapping.Rd @@ -38,20 +38,20 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{RangeDataMapping$new()}} -\item \href{#method-checkMapData}{\code{RangeDataMapping$checkMapData()}} -\item \href{#method-clone}{\code{RangeDataMapping$clone()}} +\item \href{#method-RangeDataMapping-new}{\code{RangeDataMapping$new()}} +\item \href{#method-RangeDataMapping-checkMapData}{\code{RangeDataMapping$checkMapData()}} +\item \href{#method-RangeDataMapping-clone}{\code{RangeDataMapping$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -} -\out{
} -} +\if{html}{\out{ +
Inherited methods +
    +
+
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-RangeDataMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{RangeDataMapping} object \subsection{Usage}{ @@ -102,8 +102,8 @@ A new \code{RangeDataMapping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-checkMapData}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-RangeDataMapping-checkMapData}{}}} \subsection{Method \code{checkMapData()}}{ Check that \code{data} variables include map variables \subsection{Usage}{ @@ -125,8 +125,8 @@ Dummy variable \code{legendLabels} is necessary to allow further modification of } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-RangeDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/ResVsPredDataMapping.Rd b/man/ResVsPredDataMapping.Rd index 63bab638..f37d01ff 100644 --- a/man/ResVsPredDataMapping.Rd +++ b/man/ResVsPredDataMapping.Rd @@ -29,20 +29,20 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-clone}{\code{ResVsPredDataMapping$clone()}} +\item \href{#method-ResVsPredDataMapping-clone}{\code{ResVsPredDataMapping$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/PKRatioDataMapping.html#method-checkMapData}{\code{tlf::PKRatioDataMapping$checkMapData()}}\out{} -\item \out{}\href{../../tlf/html/ObsVsPredDataMapping.html#method-initialize}{\code{tlf::ObsVsPredDataMapping$initialize()}}\out{} -} -\out{
} -} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ResVsPredDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/ResVsPredPlotConfiguration.Rd b/man/ResVsPredPlotConfiguration.Rd index b194eba9..4766e7f4 100644 --- a/man/ResVsPredPlotConfiguration.Rd +++ b/man/ResVsPredPlotConfiguration.Rd @@ -12,19 +12,19 @@ R6 class defining the configuration of a \code{ggplot} object for Res vs Pred/Ti \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-clone}{\code{ResVsPredPlotConfiguration$clone()}} +\item \href{#method-ResVsPredPlotConfiguration-clone}{\code{ResVsPredPlotConfiguration$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/PlotConfiguration.html#method-initialize}{\code{tlf::PlotConfiguration$initialize()}}\out{} -} -\out{
} -} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ResVsPredPlotConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/Theme.Rd b/man/Theme.Rd index 1fd2dddc..09f84896 100644 --- a/man/Theme.Rd +++ b/man/Theme.Rd @@ -22,14 +22,14 @@ R6 class defining theme properties \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{Theme$new()}} -\item \href{#method-save}{\code{Theme$save()}} -\item \href{#method-clone}{\code{Theme$clone()}} +\item \href{#method-Theme-new}{\code{Theme$new()}} +\item \href{#method-Theme-save}{\code{Theme$save()}} +\item \href{#method-Theme-clone}{\code{Theme$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Theme-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{Theme} object \subsection{Usage}{ @@ -59,8 +59,8 @@ A new \code{Theme} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-save}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Theme-save}{}}} \subsection{Method \code{save()}}{ Save \code{Theme} as a json file \subsection{Usage}{ @@ -76,8 +76,8 @@ Save \code{Theme} as a json file } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Theme-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/ThemeAestheticMaps.Rd b/man/ThemeAestheticMaps.Rd index 3bf0c58a..4c1854dd 100644 --- a/man/ThemeAestheticMaps.Rd +++ b/man/ThemeAestheticMaps.Rd @@ -26,14 +26,14 @@ R6 class defining theme aesthetic maps \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{ThemeAestheticMaps$new()}} -\item \href{#method-toJson}{\code{ThemeAestheticMaps$toJson()}} -\item \href{#method-clone}{\code{ThemeAestheticMaps$clone()}} +\item \href{#method-ThemeAestheticMaps-new}{\code{ThemeAestheticMaps$new()}} +\item \href{#method-ThemeAestheticMaps-toJson}{\code{ThemeAestheticMaps$toJson()}} +\item \href{#method-ThemeAestheticMaps-clone}{\code{ThemeAestheticMaps$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemeAestheticMaps-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{ThemeAestheticMaps} object \subsection{Usage}{ @@ -69,8 +69,8 @@ A new \code{ThemeAestheticMaps} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-toJson}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemeAestheticMaps-toJson}{}}} \subsection{Method \code{toJson()}}{ Translate object into a json list \subsection{Usage}{ @@ -82,8 +82,8 @@ A list that can be saved into a json file } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemeAestheticMaps-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/ThemeAestheticSelections.Rd b/man/ThemeAestheticSelections.Rd index 999cdefa..a32601ba 100644 --- a/man/ThemeAestheticSelections.Rd +++ b/man/ThemeAestheticSelections.Rd @@ -12,20 +12,20 @@ R6 class defining how plot configurations will use aesthetic maps \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{ThemeAestheticSelections$new()}} -\item \href{#method-toJson}{\code{ThemeAestheticSelections$toJson()}} -\item \href{#method-clone}{\code{ThemeAestheticSelections$clone()}} +\item \href{#method-ThemeAestheticSelections-new}{\code{ThemeAestheticSelections$new()}} +\item \href{#method-ThemeAestheticSelections-toJson}{\code{ThemeAestheticSelections$toJson()}} +\item \href{#method-ThemeAestheticSelections-clone}{\code{ThemeAestheticSelections$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -} -\out{
} -} +\if{html}{\out{ +
Inherited methods +
    +
+
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemeAestheticSelections-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{ThemeAestheticSelections} object \subsection{Usage}{ @@ -61,8 +61,8 @@ A new \code{ThemeAestheticSelections} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-toJson}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemeAestheticSelections-toJson}{}}} \subsection{Method \code{toJson()}}{ Translate object into a json list \subsection{Usage}{ @@ -74,8 +74,8 @@ A list that can be saved into a json file } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemeAestheticSelections-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/ThemeBackground.Rd b/man/ThemeBackground.Rd index cc81dad9..94317db8 100644 --- a/man/ThemeBackground.Rd +++ b/man/ThemeBackground.Rd @@ -34,14 +34,14 @@ R6 class defining theme background properties \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{ThemeBackground$new()}} -\item \href{#method-toJson}{\code{ThemeBackground$toJson()}} -\item \href{#method-clone}{\code{ThemeBackground$clone()}} +\item \href{#method-ThemeBackground-new}{\code{ThemeBackground$new()}} +\item \href{#method-ThemeBackground-toJson}{\code{ThemeBackground$toJson()}} +\item \href{#method-ThemeBackground-clone}{\code{ThemeBackground$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemeBackground-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{ThemeBackground} object \subsection{Usage}{ @@ -101,8 +101,8 @@ A new \code{ThemeBackground} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-toJson}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemeBackground-toJson}{}}} \subsection{Method \code{toJson()}}{ Translate object into a json list \subsection{Usage}{ @@ -114,8 +114,8 @@ A list that can be saved into a json file } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemeBackground-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/ThemeFont.Rd b/man/ThemeFont.Rd index 3a3f71c3..ec29d9f7 100644 --- a/man/ThemeFont.Rd +++ b/man/ThemeFont.Rd @@ -34,14 +34,14 @@ R6 class defining theme font properties \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{ThemeFont$new()}} -\item \href{#method-toJson}{\code{ThemeFont$toJson()}} -\item \href{#method-clone}{\code{ThemeFont$clone()}} +\item \href{#method-ThemeFont-new}{\code{ThemeFont$new()}} +\item \href{#method-ThemeFont-toJson}{\code{ThemeFont$toJson()}} +\item \href{#method-ThemeFont-clone}{\code{ThemeFont$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemeFont-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{ThemeFont} object \subsection{Usage}{ @@ -107,8 +107,8 @@ A new \code{ThemeFont} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-toJson}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemeFont-toJson}{}}} \subsection{Method \code{toJson()}}{ Translate object into a json list \subsection{Usage}{ @@ -120,8 +120,8 @@ A list that can be saved into a json file } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemeFont-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/ThemePlotConfigurations.Rd b/man/ThemePlotConfigurations.Rd index df7338a7..0af613a8 100644 --- a/man/ThemePlotConfigurations.Rd +++ b/man/ThemePlotConfigurations.Rd @@ -36,14 +36,14 @@ R6 class defining theme of plot configuration objects \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{ThemePlotConfigurations$new()}} -\item \href{#method-toJson}{\code{ThemePlotConfigurations$toJson()}} -\item \href{#method-clone}{\code{ThemePlotConfigurations$clone()}} +\item \href{#method-ThemePlotConfigurations-new}{\code{ThemePlotConfigurations$new()}} +\item \href{#method-ThemePlotConfigurations-toJson}{\code{ThemePlotConfigurations$toJson()}} +\item \href{#method-ThemePlotConfigurations-clone}{\code{ThemePlotConfigurations$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemePlotConfigurations-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{ThemePlotConfigurations} object \subsection{Usage}{ @@ -94,8 +94,8 @@ A new \code{ThemePlotConfigurations} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-toJson}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemePlotConfigurations-toJson}{}}} \subsection{Method \code{toJson()}}{ Translate object into a json list \subsection{Usage}{ @@ -107,8 +107,8 @@ A list that can be saved into a json file } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ThemePlotConfigurations-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/TimeProfileDataMapping.Rd b/man/TimeProfileDataMapping.Rd index 83f49dfd..8fdb9442 100644 --- a/man/TimeProfileDataMapping.Rd +++ b/man/TimeProfileDataMapping.Rd @@ -29,20 +29,20 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{TimeProfileDataMapping$new()}} -\item \href{#method-checkMapData}{\code{TimeProfileDataMapping$checkMapData()}} -\item \href{#method-clone}{\code{TimeProfileDataMapping$clone()}} +\item \href{#method-TimeProfileDataMapping-new}{\code{TimeProfileDataMapping$new()}} +\item \href{#method-TimeProfileDataMapping-checkMapData}{\code{TimeProfileDataMapping$checkMapData()}} +\item \href{#method-TimeProfileDataMapping-clone}{\code{TimeProfileDataMapping$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -} -\out{
} -} +\if{html}{\out{ +
Inherited methods +
    +
+
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-TimeProfileDataMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{TimeProfileDataMapping} object \subsection{Usage}{ @@ -87,8 +87,8 @@ A new \code{RangeDataMapping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-checkMapData}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-TimeProfileDataMapping-checkMapData}{}}} \subsection{Method \code{checkMapData()}}{ Check that \code{data} variables include map variables \subsection{Usage}{ @@ -110,8 +110,8 @@ Dummy variable \code{legendLabels} is necessary to allow further modification of } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-TimeProfileDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/TimeProfilePlotConfiguration.Rd b/man/TimeProfilePlotConfiguration.Rd index 68db0818..17f9eaa5 100644 --- a/man/TimeProfilePlotConfiguration.Rd +++ b/man/TimeProfilePlotConfiguration.Rd @@ -23,19 +23,19 @@ Other PlotConfiguration classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-clone}{\code{TimeProfilePlotConfiguration$clone()}} +\item \href{#method-TimeProfilePlotConfiguration-clone}{\code{TimeProfilePlotConfiguration$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/PlotConfiguration.html#method-initialize}{\code{tlf::PlotConfiguration$initialize()}}\out{} -} -\out{
} -} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-TimeProfilePlotConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/TornadoDataMapping.Rd b/man/TornadoDataMapping.Rd index 0eaf0956..2dd058bf 100644 --- a/man/TornadoDataMapping.Rd +++ b/man/TornadoDataMapping.Rd @@ -38,20 +38,20 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{TornadoDataMapping$new()}} -\item \href{#method-checkMapData}{\code{TornadoDataMapping$checkMapData()}} -\item \href{#method-clone}{\code{TornadoDataMapping$clone()}} +\item \href{#method-TornadoDataMapping-new}{\code{TornadoDataMapping$new()}} +\item \href{#method-TornadoDataMapping-checkMapData}{\code{TornadoDataMapping$checkMapData()}} +\item \href{#method-TornadoDataMapping-clone}{\code{TornadoDataMapping$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -} -\out{
} -} +\if{html}{\out{ +
Inherited methods +
    +
+
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-TornadoDataMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{TornadoDataMapping} object \subsection{Usage}{ @@ -84,8 +84,8 @@ A new \code{TornadoDataMapping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-checkMapData}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-TornadoDataMapping-checkMapData}{}}} \subsection{Method \code{checkMapData()}}{ Check that \code{data} variables include map variables \subsection{Usage}{ @@ -107,8 +107,8 @@ Dummy variable \code{defaultAes} is necessary to allow further modification of p } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-TornadoDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/TornadoPlotConfiguration.Rd b/man/TornadoPlotConfiguration.Rd index 796031b8..cfa5e0e1 100644 --- a/man/TornadoPlotConfiguration.Rd +++ b/man/TornadoPlotConfiguration.Rd @@ -36,19 +36,19 @@ Other PlotConfiguration classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{TornadoPlotConfiguration$new()}} -\item \href{#method-clone}{\code{TornadoPlotConfiguration$clone()}} +\item \href{#method-TornadoPlotConfiguration-new}{\code{TornadoPlotConfiguration$new()}} +\item \href{#method-TornadoPlotConfiguration-clone}{\code{TornadoPlotConfiguration$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -} -\out{
} -} +\if{html}{\out{ +
Inherited methods +
    +
+
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-TornadoPlotConfiguration-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{TornadoPlotConfiguration} object \subsection{Usage}{ @@ -73,8 +73,8 @@ A new \code{TornadoPlotConfiguration} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-TornadoPlotConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/XAxisConfiguration.Rd b/man/XAxisConfiguration.Rd index aee9a024..7abd8125 100644 --- a/man/XAxisConfiguration.Rd +++ b/man/XAxisConfiguration.Rd @@ -12,24 +12,24 @@ R6 class defining the configuration of X-axis \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-updatePlot}{\code{XAxisConfiguration$updatePlot()}} -\item \href{#method-clone}{\code{XAxisConfiguration$clone()}} -} -} -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/AxisConfiguration.html#method-ggplotExpansion}{\code{tlf::AxisConfiguration$ggplotExpansion()}}\out{} -\item \out{}\href{../../tlf/html/AxisConfiguration.html#method-ggplotScale}{\code{tlf::AxisConfiguration$ggplotScale()}}\out{} -\item \out{}\href{../../tlf/html/AxisConfiguration.html#method-initialize}{\code{tlf::AxisConfiguration$initialize()}}\out{} -\item \out{}\href{../../tlf/html/AxisConfiguration.html#method-prettyTickLabels}{\code{tlf::AxisConfiguration$prettyTickLabels()}}\out{} -\item \out{}\href{../../tlf/html/AxisConfiguration.html#method-prettyTicks}{\code{tlf::AxisConfiguration$prettyTicks()}}\out{} -} -\out{
} -} +\item \href{#method-XAxisConfiguration-updatePlot}{\code{XAxisConfiguration$updatePlot()}} +\item \href{#method-XAxisConfiguration-clone}{\code{XAxisConfiguration$clone()}} +} +} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-updatePlot}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-XAxisConfiguration-updatePlot}{}}} \subsection{Method \code{updatePlot()}}{ Update axis configuration on a \code{ggplot} object \subsection{Usage}{ @@ -50,8 +50,8 @@ A \code{ggplot} object with updated axis properties } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-XAxisConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/XYDataMapping.Rd b/man/XYDataMapping.Rd index 8b07d721..d5fe0fda 100644 --- a/man/XYDataMapping.Rd +++ b/man/XYDataMapping.Rd @@ -37,14 +37,14 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{XYDataMapping$new()}} -\item \href{#method-checkMapData}{\code{XYDataMapping$checkMapData()}} -\item \href{#method-clone}{\code{XYDataMapping$clone()}} +\item \href{#method-XYDataMapping-new}{\code{XYDataMapping$new()}} +\item \href{#method-XYDataMapping-checkMapData}{\code{XYDataMapping$checkMapData()}} +\item \href{#method-XYDataMapping-clone}{\code{XYDataMapping$clone()}} } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-XYDataMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{XYDataMapping} object \subsection{Usage}{ @@ -65,8 +65,8 @@ A new \code{XYDataMapping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-checkMapData}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-XYDataMapping-checkMapData}{}}} \subsection{Method \code{checkMapData()}}{ Check that \code{data} variables include map variables \subsection{Usage}{ @@ -88,8 +88,8 @@ Dummy variable \code{defaultAes} is necessary to allow further modification of p } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-XYDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/XYGDataMapping.Rd b/man/XYGDataMapping.Rd index 313c192f..3fa3799e 100644 --- a/man/XYGDataMapping.Rd +++ b/man/XYGDataMapping.Rd @@ -36,20 +36,20 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{XYGDataMapping$new()}} -\item \href{#method-checkMapData}{\code{XYGDataMapping$checkMapData()}} -\item \href{#method-clone}{\code{XYGDataMapping$clone()}} +\item \href{#method-XYGDataMapping-new}{\code{XYGDataMapping$new()}} +\item \href{#method-XYGDataMapping-checkMapData}{\code{XYGDataMapping$checkMapData()}} +\item \href{#method-XYGDataMapping-clone}{\code{XYGDataMapping$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -} -\out{
} -} +\if{html}{\out{ +
Inherited methods +
    +
+
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-XYGDataMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{XYGDataMapping} object \subsection{Usage}{ @@ -97,8 +97,8 @@ A new \code{XYGDataMapping} object } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-checkMapData}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-XYGDataMapping-checkMapData}{}}} \subsection{Method \code{checkMapData()}}{ Check that \code{data} variables include map variables \subsection{Usage}{ @@ -120,8 +120,8 @@ Dummy variable \code{defaultAes} is necessary to allow further modification of p } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-XYGDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/YAxisConfiguration.Rd b/man/YAxisConfiguration.Rd index bb7da7dd..59186013 100644 --- a/man/YAxisConfiguration.Rd +++ b/man/YAxisConfiguration.Rd @@ -19,24 +19,24 @@ R6 class defining the configuration of Y-axis \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-updatePlot}{\code{YAxisConfiguration$updatePlot()}} -\item \href{#method-clone}{\code{YAxisConfiguration$clone()}} -} -} -\if{html}{ -\out{
Inherited methods} -\itemize{ -\item \out{}\href{../../tlf/html/AxisConfiguration.html#method-ggplotExpansion}{\code{tlf::AxisConfiguration$ggplotExpansion()}}\out{} -\item \out{}\href{../../tlf/html/AxisConfiguration.html#method-ggplotScale}{\code{tlf::AxisConfiguration$ggplotScale()}}\out{} -\item \out{}\href{../../tlf/html/AxisConfiguration.html#method-initialize}{\code{tlf::AxisConfiguration$initialize()}}\out{} -\item \out{}\href{../../tlf/html/AxisConfiguration.html#method-prettyTickLabels}{\code{tlf::AxisConfiguration$prettyTickLabels()}}\out{} -\item \out{}\href{../../tlf/html/AxisConfiguration.html#method-prettyTicks}{\code{tlf::AxisConfiguration$prettyTicks()}}\out{} -} -\out{
} -} +\item \href{#method-YAxisConfiguration-updatePlot}{\code{YAxisConfiguration$updatePlot()}} +\item \href{#method-YAxisConfiguration-clone}{\code{YAxisConfiguration$clone()}} +} +} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-updatePlot}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-YAxisConfiguration-updatePlot}{}}} \subsection{Method \code{updatePlot()}}{ Update axis configuration on a \code{ggplot} object \subsection{Usage}{ @@ -57,8 +57,8 @@ A \code{ggplot} object with updated axis properties } } \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-YAxisConfiguration-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ diff --git a/man/addErrorbar.Rd b/man/addErrorbar.Rd index 5ffbf108..a787a9dd 100644 --- a/man/addErrorbar.Rd +++ b/man/addErrorbar.Rd @@ -58,14 +58,14 @@ Add an errorbar layer to a \code{ggplot} object. \examples{ # Add errorbar using x, ymin and ymax addErrorbar( -x = c(1, 2, 1, 2, 3), -ymin = c(5, 0, 2, 3, 4), -ymax = c(6, 2, 6, 2.5, 5) + x = c(1, 2, 1, 2, 3), + ymin = c(5, 0, 2, 3, 4), + ymax = c(6, 2, 6, 2.5, 5) ) # Add errorbar using a data.frame time <- seq(0, 30, 0.5) -errorbarData <- data.frame(x = time, ymin = cos(time)-1, ymax = cos(time)+1) +errorbarData <- data.frame(x = time, ymin = cos(time) - 1, ymax = cos(time) + 1) addErrorbar( data = errorbarData, @@ -83,13 +83,13 @@ addErrorbar(data = errorbarData, color = "blue", size = 0.5, includeCap = TRUE, # Add a errorbar with specific properties p <- addErrorbar( -data = errorbarData, -color = "blue", size = 0.5, includeCap = TRUE, caption = "My data" + data = errorbarData, + color = "blue", size = 0.5, includeCap = TRUE, caption = "My data" ) addScatter( -x = time, y = cos(time), -color = "red", size = 1, caption = "My data", -plotObject = p + x = time, y = cos(time), + color = "red", size = 1, caption = "My data", + plotObject = p ) } diff --git a/man/addLine.Rd b/man/addLine.Rd index 6258f4d0..8f5ada58 100644 --- a/man/addLine.Rd +++ b/man/addLine.Rd @@ -74,19 +74,19 @@ addLine(data = lineData, caption = "My line plot") # Add a line with specific properties addLine( -data = lineData, -color = "blue", linetype = "longdash", size = 0.5, caption = "My data" + data = lineData, + color = "blue", linetype = "longdash", size = 0.5, caption = "My data" ) # Add a line with specific properties p <- addLine( -data = lineData, -color = "blue", linetype = "longdash", size = 0.5, caption = "My data" + data = lineData, + color = "blue", linetype = "longdash", size = 0.5, caption = "My data" ) addLine( -x = c(0, 1), y = c(1, 0), -color = "red", linetype = "solid", size = 1, -plotObject = p + x = c(0, 1), y = c(1, 0), + color = "red", linetype = "solid", size = 1, + plotObject = p ) } diff --git a/man/addRibbon.Rd b/man/addRibbon.Rd index d025ba6f..56f0d1a2 100644 --- a/man/addRibbon.Rd +++ b/man/addRibbon.Rd @@ -64,14 +64,14 @@ Add a ribbon layer to a \code{ggplot} object. \examples{ # Add ribbon using x, ymin and ymax addRibbon( -x = c(1, 2, 1, 2, 3), -ymin = c(5, 0, 2, 3, 4), -ymax = c(6, 2, 6, 2.5, 5) + x = c(1, 2, 1, 2, 3), + ymin = c(5, 0, 2, 3, 4), + ymax = c(6, 2, 6, 2.5, 5) ) # Add ribbon using a data.frame time <- seq(0, 30, 0.1) -ribbonData <- data.frame(x = time, ymin = cos(time)-1, ymax = cos(time)+1) +ribbonData <- data.frame(x = time, ymin = cos(time) - 1, ymax = cos(time) + 1) addRibbon( data = ribbonData, @@ -90,9 +90,9 @@ addRibbon(data = ribbonData, fill = "blue", alpha = 0.5, caption = "My data") # Add a ribbon with specific properties p <- addRibbon(data = ribbonData, fill = "blue", alpha = 0.5, caption = "My data") addRibbon( -x = c(0, 1), ymin = c(-0.5, -0.5), ymax = c(0.5, 0.5), -fill = "red", alpha = 1, -plotObject = p + x = c(0, 1), ymin = c(-0.5, -0.5), ymax = c(0.5, 0.5), + fill = "red", alpha = 1, + plotObject = p ) } diff --git a/man/addScatter.Rd b/man/addScatter.Rd index 3ffdc3b0..25bd1549 100644 --- a/man/addScatter.Rd +++ b/man/addScatter.Rd @@ -74,19 +74,19 @@ addScatter(data = scatterData, caption = "My scatter plot") # Add a scatter with specific properties addScatter( -data = scatterData, -color = "blue", shape = "diamond", size = 2, caption = "My data" + data = scatterData, + color = "blue", shape = "diamond", size = 2, caption = "My data" ) # Add a scatter with specific properties p <- addScatter( -data = scatterData, -color = "blue", shape = "diamond", size = 2, caption = "My data" + data = scatterData, + color = "blue", shape = "diamond", size = 2, caption = "My data" ) addScatter( -x = c(0, 1), y = c(1, 0), -color = "red", shape = "circle", size = 3, -plotObject = p + x = c(0, 1), y = c(1, 0), + color = "red", shape = "circle", size = 3, + plotObject = p ) } diff --git a/man/addWatermark.Rd b/man/addWatermark.Rd index b32d190f..43ef4454 100644 --- a/man/addWatermark.Rd +++ b/man/addWatermark.Rd @@ -50,7 +50,7 @@ addWatermark(p, watermarkLabel, angle = 0) # Watermark totally opaque addWatermark(p, watermarkLabel, alpha = 1) -# As multiple layers of watermark: +# As multiple layers of watermark: p2 <- addWatermark(p, watermarkLabel, alpha = 1) addWatermark(p2, "other watermark", color = "red", angle = 90) diff --git a/man/getBoxWhiskerMeasure.Rd b/man/getBoxWhiskerMeasure.Rd index 628fa4a6..01dc435b 100644 --- a/man/getBoxWhiskerMeasure.Rd +++ b/man/getBoxWhiskerMeasure.Rd @@ -31,7 +31,7 @@ Get a summary table of Box Whisker percentiles } \examples{ # Get box-and-whisker plots of log-normal distributed data -boxData <- data.frame(x = c(rep("A", 500), rep("B",500)), y = rlnorm(1000)) +boxData <- data.frame(x = c(rep("A", 500), rep("B", 500)), y = rlnorm(1000)) getBoxWhiskerMeasure(data = boxData, dataMapping = BoxWhiskerDataMapping$new(x = "x", y = "y")) diff --git a/man/getGuestValues.Rd b/man/getGuestValues.Rd index 8ce17255..836835d1 100644 --- a/man/getGuestValues.Rd +++ b/man/getGuestValues.Rd @@ -27,10 +27,10 @@ Get a data.frame with Guest et al. ratio limits with: } \examples{ # Get predicted vs observed Guest et al. limits -getGuestValues(x = 10^seq(-2,2,0.2)) +getGuestValues(x = 10^seq(-2, 2, 0.2)) # Get residuals vs observed Guest et al. limits -getGuestValues(x = 10^seq(-2,2,0.2), residualsVsObserved = TRUE) +getGuestValues(x = 10^seq(-2, 2, 0.2), residualsVsObserved = TRUE) } \references{ diff --git a/man/getGuestValuesFromDataMapping.Rd b/man/getGuestValuesFromDataMapping.Rd index 263d51ec..672e9423 100644 --- a/man/getGuestValuesFromDataMapping.Rd +++ b/man/getGuestValuesFromDataMapping.Rd @@ -22,8 +22,8 @@ Get a data.frame with Guest et al. ratio limits from \code{data} and its \code{D ddiData <- data.frame(x = c(1, 2, 1, 2, 3), y = c(5, 0.2, 2, 3, 4)) getGuestValuesFromDataMapping( -data = ddiData, -dataMapping = DDIRatioDataMapping$new(x = "x", y = "y") + data = ddiData, + dataMapping = DDIRatioDataMapping$new(x = "x", y = "y") ) } diff --git a/man/getPKRatioMeasure.Rd b/man/getPKRatioMeasure.Rd index 7c9d968e..08075aac 100644 --- a/man/getPKRatioMeasure.Rd +++ b/man/getPKRatioMeasure.Rd @@ -27,9 +27,9 @@ getPKRatioMeasure(data = pkData, dataMapping = PKRatioDataMapping$new(x = "x", y # Get summary of other PK Ratio limits getPKRatioMeasure( -data = pkData, -dataMapping = PKRatioDataMapping$new(x = "x", y = "y"), -ratioLimits = seq(1.5, 5, 0.5) + data = pkData, + dataMapping = PKRatioDataMapping$new(x = "x", y = "y"), + ratioLimits = seq(1.5, 5, 0.5) ) } diff --git a/man/mean-1.96sd.Rd b/man/mean-1.96sd.Rd index 6e7defa2..bfdff444 100644 --- a/man/mean-1.96sd.Rd +++ b/man/mean-1.96sd.Rd @@ -18,7 +18,7 @@ Calculate \verb{mean-1.96SD} \examples{ # Calculate mean-1.96SD `mean-1.96sd`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/mean-plus-1.96sd.Rd b/man/mean-plus-1.96sd.Rd index e1d7ff64..0c55e144 100644 --- a/man/mean-plus-1.96sd.Rd +++ b/man/mean-plus-1.96sd.Rd @@ -18,7 +18,7 @@ Calculate \verb{mean+1.96SD} \examples{ # Calculate mean+1.96SD `mean+1.96sd`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/mean-plus-sd.Rd b/man/mean-plus-sd.Rd index f0cef476..964abfb3 100644 --- a/man/mean-plus-sd.Rd +++ b/man/mean-plus-sd.Rd @@ -18,7 +18,7 @@ Calculate \code{mean+SD} \examples{ # Calculate mean-SD `mean+sd`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/mean-sd.Rd b/man/mean-sd.Rd index 8b983f14..85d12593 100644 --- a/man/mean-sd.Rd +++ b/man/mean-sd.Rd @@ -18,7 +18,7 @@ Calculate \code{mean-SD} \examples{ # Calculate mean-SD `mean-sd`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/median-1.5IQR.Rd b/man/median-1.5IQR.Rd index 837b3f10..0b0c2d48 100644 --- a/man/median-1.5IQR.Rd +++ b/man/median-1.5IQR.Rd @@ -18,7 +18,7 @@ Calculate \verb{median-1.5IQR} \examples{ # Calculate median-1.5IQR `median-1.5IQR`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/median-IQR.Rd b/man/median-IQR.Rd index fba817bc..689c0801 100644 --- a/man/median-IQR.Rd +++ b/man/median-IQR.Rd @@ -18,7 +18,7 @@ Calculate \code{median-IQR} \examples{ # Calculate median-IQR `median-IQR`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/median-plus-1.5IQR.Rd b/man/median-plus-1.5IQR.Rd index 5b38d4ee..e2f9472f 100644 --- a/man/median-plus-1.5IQR.Rd +++ b/man/median-plus-1.5IQR.Rd @@ -18,7 +18,7 @@ Calculate \verb{median+1.5IQR} \examples{ # Calculate median+1.5IQR `median+1.5IQR`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/median-plus-IQR.Rd b/man/median-plus-IQR.Rd index 1abe577c..08334692 100644 --- a/man/median-plus-IQR.Rd +++ b/man/median-plus-IQR.Rd @@ -18,7 +18,7 @@ Calculate \code{median+IQR} \examples{ # Calculate median+IQR `median+IQR`(rnorm(1000)) - + } \seealso{ Other stat functions: diff --git a/man/plotBoxWhisker.Rd b/man/plotBoxWhisker.Rd index 23604a50..269036f4 100644 --- a/man/plotBoxWhisker.Rd +++ b/man/plotBoxWhisker.Rd @@ -34,14 +34,16 @@ Producing box-and-whisker plots } \examples{ # Produce box-and-whisker plots of log-normal distributed data -boxData <- data.frame(x = c(rep("A", 500), rep("B",500)), y = rlnorm(1000)) +boxData <- data.frame(x = c(rep("A", 500), rep("B", 500)), y = rlnorm(1000)) plotBoxWhisker(data = boxData, dataMapping = BoxWhiskerDataMapping$new(x = "x", y = "y")) # Remove outliers from boxplot -plotBoxWhisker(data = boxData, -dataMapping = BoxWhiskerDataMapping$new(x = "x", y = "y"), -outliers = FALSE) +plotBoxWhisker( + data = boxData, + dataMapping = BoxWhiskerDataMapping$new(x = "x", y = "y"), + outliers = FALSE +) } \references{ diff --git a/man/plotHistogram.Rd b/man/plotHistogram.Rd index 89d4906a..0ddb5825 100644 --- a/man/plotHistogram.Rd +++ b/man/plotHistogram.Rd @@ -59,7 +59,6 @@ plotHistogram(x = rlnorm(100), bins = 21) # Produce histogram of fitted normally distributed data plotHistogram(x = rlnorm(100), distribution = "normal") - } \references{ For examples, see: diff --git a/man/plotObsVsPred.Rd b/man/plotObsVsPred.Rd index 73ff979a..5fd487b9 100644 --- a/man/plotObsVsPred.Rd +++ b/man/plotObsVsPred.Rd @@ -44,9 +44,9 @@ plotObsVsPred(data = obsVsPredData, dataMapping = ObsVsPredDataMapping$new(x = " # Produce Obs vs Pred plot with linear regression plotObsVsPred( -data = obsVsPredData, -dataMapping = ObsVsPredDataMapping$new(x = "x", y = "y"), -smoother = "lm" + data = obsVsPredData, + dataMapping = ObsVsPredDataMapping$new(x = "x", y = "y"), + smoother = "lm" ) } diff --git a/man/plotResVsPred.Rd b/man/plotResVsPred.Rd index 89985ce9..8eee6f3b 100644 --- a/man/plotResVsPred.Rd +++ b/man/plotResVsPred.Rd @@ -44,9 +44,9 @@ plotResVsPred(data = resVsPredData, dataMapping = ResVsPredDataMapping$new(x = " # Produce Res vs Pred plot with linear regression plotResVsPred( -data = resVsPredData, -dataMapping = ResVsPredDataMapping$new(x = "x", y = "y"), -smoother = "lm" + data = resVsPredData, + dataMapping = ResVsPredDataMapping$new(x = "x", y = "y"), + smoother = "lm" ) } \seealso{ diff --git a/man/useDarkTheme.Rd b/man/useDarkTheme.Rd index a74661f5..e067f706 100644 --- a/man/useDarkTheme.Rd +++ b/man/useDarkTheme.Rd @@ -11,5 +11,5 @@ Set default Matlab theme to be used as the current default of the tlf environmen } \examples{ useDarkTheme() -addScatter(x = seq(1,10), y = rnorm(10)) +addScatter(x = seq(1, 10), y = rnorm(10)) } diff --git a/man/useExcelTheme.Rd b/man/useExcelTheme.Rd index 7bdd0c87..3dc4ef9c 100644 --- a/man/useExcelTheme.Rd +++ b/man/useExcelTheme.Rd @@ -11,5 +11,5 @@ Set default Excel theme to be used as the current default of the tlf environment } \examples{ useExcelTheme() -addScatter(x = seq(1,10), y = rnorm(10)) +addScatter(x = seq(1, 10), y = rnorm(10)) } diff --git a/man/useHighChartTheme.Rd b/man/useHighChartTheme.Rd index 6cc3601d..9da329b5 100644 --- a/man/useHighChartTheme.Rd +++ b/man/useHighChartTheme.Rd @@ -11,5 +11,5 @@ Set default HighChart theme to be used as the current default of the tlf environ } \examples{ useHighChartTheme() -addScatter(x = seq(1,10), y = rnorm(10)) +addScatter(x = seq(1, 10), y = rnorm(10)) } diff --git a/man/useMatlabTheme.Rd b/man/useMatlabTheme.Rd index d74b16fb..58fca622 100644 --- a/man/useMatlabTheme.Rd +++ b/man/useMatlabTheme.Rd @@ -11,5 +11,5 @@ Set default Matlab theme to be used as the current default of the tlf environmen } \examples{ useMatlabTheme() -addScatter(x = seq(1,10), y = rnorm(10)) +addScatter(x = seq(1, 10), y = rnorm(10)) } diff --git a/man/useMinimalTheme.Rd b/man/useMinimalTheme.Rd index 959e1805..584a998c 100644 --- a/man/useMinimalTheme.Rd +++ b/man/useMinimalTheme.Rd @@ -11,5 +11,5 @@ Set default minimal theme to be used as the current default of the tlf environme } \examples{ useMinimalTheme() -addScatter(x = seq(1,10), y = rnorm(10)) +addScatter(x = seq(1, 10), y = rnorm(10)) } diff --git a/man/useTemplateTheme.Rd b/man/useTemplateTheme.Rd index ad5735be..6ca56370 100644 --- a/man/useTemplateTheme.Rd +++ b/man/useTemplateTheme.Rd @@ -11,5 +11,5 @@ Set default theme to be used as the current default of the tlf environment } \examples{ useTemplateTheme() -addScatter(x = seq(1,10), y = rnorm(10)) +addScatter(x = seq(1, 10), y = rnorm(10)) } diff --git a/tests/testthat/test-export.R b/tests/testthat/test-export.R index 11fbec98..9978333e 100644 --- a/tests/testthat/test-export.R +++ b/tests/testthat/test-export.R @@ -2,7 +2,7 @@ context("Export plots") test_that("Check that plot configuration uses default values when undefined", { testPlotConfiguration <- PlotConfiguration$new() - + expect_equal(testPlotConfiguration$export$format, tlf:::tlfEnv$defaultExportParameters$format) expect_equal(testPlotConfiguration$export$name, tlf:::tlfEnv$defaultExportParameters$name) expect_equal(testPlotConfiguration$export$width, tlf:::tlfEnv$defaultExportParameters$width) @@ -21,7 +21,7 @@ test_that("Check that plot configuration uses values when defined", { units = "in", dpi = 72 ) - + expect_equal(testPlotConfiguration$export$format, "pdf") expect_equal(testPlotConfiguration$export$name, "test") expect_equal(testPlotConfiguration$export$width, 4) @@ -35,10 +35,10 @@ test_that("Check that export configuration convert pixels to inches for ggplot c plotConfigurationPx <- PlotConfiguration$new(units = "px") plotConfigurationIn <- PlotConfiguration$new(units = "in") plotConfigurationInRef <- PlotConfiguration$new(units = "in") - + plotConfigurationPx$export$convertPixels() plotConfigurationIn$export$convertPixels() - + expect_equal(plotConfigurationPx$export$units, "in") expect_equal(plotConfigurationIn$export$units, "in") expect_equal(plotConfigurationInRef$export$width, plotConfigurationIn$export$width) @@ -46,28 +46,27 @@ test_that("Check that export configuration convert pixels to inches for ggplot c }) test_that("Update of dimensions prevents shrinking", { - initialPlotObject <- addScatter(x = c(1,2), y = c(1,2), caption = "test legend caption") + initialPlotObject <- addScatter(x = c(1, 2), y = c(1, 2), caption = "test legend caption") # Ensure unit is not in px for test initialPlotObject <- setPlotExport(initialPlotObject, units = "in", width = 4, height = 3) - + # No legend, export dimensions stay the same nonePlotObject <- setLegendPosition(initialPlotObject, position = LegendPositions$none) updatedNonePlotObject <- updateExportDimensionsForLegend(nonePlotObject) expect_equal(nonePlotObject$plotConfiguration$export$width, updatedNonePlotObject$plotConfiguration$export$width) expect_equal(nonePlotObject$plotConfiguration$export$height, updatedNonePlotObject$plotConfiguration$export$height) - + # Legend on top, export dimensions extend height topPlotObject <- setLegendPosition(initialPlotObject, position = LegendPositions$outsideTop) updatedTopPlotObject <- updateExportDimensionsForLegend(topPlotObject) expect_equal(topPlotObject$plotConfiguration$export$width, updatedTopPlotObject$plotConfiguration$export$width) expect_lt(topPlotObject$plotConfiguration$export$height, updatedTopPlotObject$plotConfiguration$export$height) - + # Legend on side, export dimensions extend width rightPlotObject <- setLegendPosition(initialPlotObject, position = LegendPositions$outsideRight) updatedRightPlotObject <- updateExportDimensionsForLegend(rightPlotObject) expect_lt(rightPlotObject$plotConfiguration$export$width, updatedRightPlotObject$plotConfiguration$export$width) expect_equal(rightPlotObject$plotConfiguration$export$height, updatedRightPlotObject$plotConfiguration$export$height) - }) test_that("Plots are saved with appropriate names", { @@ -87,8 +86,7 @@ test_that("Plots are saved with appropriate names", { test_that("Exporting plot configuration code leads to new plot configration with same fields", { plotConfigurationToExport <- PlotConfiguration$new() eval(parse(text = exportPlotConfigurationCode(plotConfigurationToExport, name = "exportedPlotConfiguration"))) - + expect_equal(class(plotConfigurationToExport), class(exportedPlotConfiguration)) expect_equal(plotConfigurationToExport, exportedPlotConfiguration) }) - diff --git a/tests/testthat/test-font-label.R b/tests/testthat/test-font-label.R index 4f0875d7..2aa4a258 100644 --- a/tests/testthat/test-font-label.R +++ b/tests/testthat/test-font-label.R @@ -35,14 +35,14 @@ test_that("Empty label is translated as element_blank from ggplot2", { emptyLabel <- Label$new(text = NULL) expect_equal( class(emptyLabel$createPlotFont())[1], - "element_blank") + "element_blank" + ) }) test_that("Non-empty label is translated as element_text from ggplot2", { nonEmptyLabel <- Label$new(text = "text") expect_equal( class(nonEmptyLabel$createPlotFont())[1], - "element_text") + "element_text" + ) }) - - diff --git a/tests/testthat/test-plot-configuration.R b/tests/testthat/test-plot-configuration.R index 33ee73cb..03381b97 100644 --- a/tests/testthat/test-plot-configuration.R +++ b/tests/testthat/test-plot-configuration.R @@ -2,7 +2,7 @@ context("Plot Configuration") # Create a reference plot configuration refPlotConfiguration <- PlotConfiguration$new() -for(property in AestheticProperties){ +for (property in AestheticProperties) { refPlotConfiguration$lines[[property]] <- "reference" refPlotConfiguration$ribbons[[property]] <- "reference" refPlotConfiguration$points[[property]] <- "reference" @@ -10,7 +10,7 @@ for(property in AestheticProperties){ } test_that("Theme properties are not updated when PlotConfiguration is updated", { - for(property in AestheticProperties){ + for (property in AestheticProperties) { testPlotConfiguration <- PlotConfiguration$new() expect_false(testPlotConfiguration$lines[[property]] %in% "reference") expect_false(testPlotConfiguration$ribbons[[property]] %in% "reference") diff --git a/tlf.Rproj b/tlf.Rproj index 9a749ba0..447ec3f3 100644 --- a/tlf.Rproj +++ b/tlf.Rproj @@ -18,6 +18,7 @@ StripTrailingWhitespace: Yes BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source +PackageRoxygenize: rd,collate,namespace QuitChildProcessesOnExit: Yes DisableExecuteRprofile: Yes