Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hillalex committed Nov 1, 2024
1 parent cd3697c commit 2943703
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
9 changes: 6 additions & 3 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ plot.biokinetics_priors <- function(x,

# Declare variables to suppress notes when compiling package
# https://github.com/Rdatatable/data.table/issues/850#issuecomment-259466153
t0 <- tp <- ts <- m1 <- m2 <- m3 <- NULL
t0 <- tp <- ts <- m1 <- m2 <- m3 <- censored <- NULL
time_since_last_exp <- me <- lo <- hi <- value <- mu <- NULL

if (!is.null(data)) {
Expand Down Expand Up @@ -64,7 +64,7 @@ plot_sero_data <- function(data, covariates = character(0)) {
add_censored_indicator(data)
# Declare variables to suppress notes when compiling package
# https://github.com/Rdatatable/data.table/issues/850#issuecomment-259466153
time_since_last_exp <- value <- titre_type <- NULL
time_since_last_exp <- value <- titre_type <- censored <- NULL

ggplot(data) +
geom_point(aes(x = time_since_last_exp, y = value, colour = titre_type, shape = censored),
Expand All @@ -90,7 +90,7 @@ plot.biokinetics_population_trajectories <- function(x, ..., data = NULL) {
# Declare variables to suppress notes when compiling package
# https://github.com/Rdatatable/data.table/issues/850#issuecomment-259466153
time_since_last_exp <- value <- me <- titre_type <- lo <- hi <- NULL
day <- last_exp_day <- NULL
day <- last_exp_day <- censored <- mu <- .draw <- NULL

if (attr(x, "summarised")) {
plot <- ggplot(x) +
Expand Down Expand Up @@ -127,6 +127,9 @@ facet_formula <- function(covariates) {
}

add_censored_indicator <- function(data) {
# Declare variables to suppress notes when compiling package
# https://github.com/Rdatatable/data.table/issues/850#issuecomment-259466153
censored <- NULL
if (!("censored" %in% colnames(data))) {
# censored is an optional column in input data
# if not present, treat all points as uncensored
Expand Down
1 change: 1 addition & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ convert_log2_scale <- function(
#' @return A data.table, identical to the input data but with specified columns transformed.
#' @param dt_in data.table containing data to be transformed from base 2 log to natural scale.
#' @param vars_to_transform Names of columns to apply the transformation to.
#' @param lower_limit The lowest value in the original dataset.
#' @export
convert_log2_scale_inverse <- function(dt_in, vars_to_transform, lower_limit) {
dt_out <- data.table::copy(dt_in)
Expand Down
2 changes: 2 additions & 0 deletions man/convert_log2_scale_inverse.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2943703

Please sign in to comment.