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 b36ad63 commit cac9fa6
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ Imports:
logger,
mosaic,
pkgload,
plotly,
R6,
shiny,
stats,
stringr,
tidybayes
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ importFrom(ggplot2,ggplot)
importFrom(ggplot2,guide_legend)
importFrom(ggplot2,guides)
importFrom(ggplot2,scale_y_continuous)
importFrom(ggplot2,theme)
importFrom(ggplot2,unit)
useDynLib(epikinetics, .registration = TRUE)
2 changes: 1 addition & 1 deletion R/epikinetics-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @importFrom data.table .NGRP
#' @importFrom data.table .SD
#' @importFrom data.table data.table
#' @importFrom ggplot2 aes facet_wrap geom_point geom_ribbon geom_line geom_smooth ggplot guides guide_legend scale_y_continuous
#' @importFrom ggplot2 aes facet_wrap geom_point geom_ribbon geom_line geom_smooth ggplot guides guide_legend scale_y_continuous theme unit
#' @useDynLib epikinetics, .registration = TRUE
## usethis namespace: end

Expand Down
2 changes: 1 addition & 1 deletion R/inspect-model.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ inspect_model <- function(mod, private) {
}
})

output$data_plot <- renderUI({
output$data_plot <- shiny::renderUI({
if (nrow(data()) > 0) {
plotly::plotlyOutput("data")
} else {
Expand Down
5 changes: 4 additions & 1 deletion R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,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 <- mu <- .draw <- NULL

if (attr(x, "summarised")) {
plot <- ggplot(x) +
Expand Down Expand Up @@ -123,6 +123,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
6 changes: 1 addition & 5 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
#' @param vars_to_transform Names of columns to apply the transformation to.
#' @export
convert_log2_scale <- function(
dt_in, vars_to_transform = "value",
simplify_limits = TRUE) {
dt_in, vars_to_transform = "value") {
dt_out <- data.table::copy(dt_in)
for (var in vars_to_transform) {
if (simplify_limits == TRUE) {
dt_out[get(var) > 2560, (var) := 2560]
}
dt_out[, (var) := log2(get(var) / 5)]
}
return(dt_out)
Expand Down
2 changes: 1 addition & 1 deletion man/convert_log2_scale.Rd

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

0 comments on commit cac9fa6

Please sign in to comment.