Skip to content

Commit

Permalink
init local vars
Browse files Browse the repository at this point in the history
to resolve R CMD check notes when working with unquoted varnames in data.table and ggplot2
  • Loading branch information
certara-jcraig committed Oct 25, 2023
1 parent 7d18e37 commit 3474faf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/binless.R
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ binlessfit <- function(o, conf.level = .95, llam.quant = NULL, span = NULL, ...)
}

.binlessvpcstats <- function(o, qpred=c(0.05, 0.5, 0.95), conf.level=0.95, quantile.type=7, vpc.type, ...){
y <- x <- blq <- fit <- . <- repl <- cprop <- rqssmed <- llam.med <- c.rqssmed <- NULL
y <- x <- blq <- fit <- . <- repl <- cprop <- rqssmed <- llam.med <- c.rqssmed <- lloq <- uloq <- alq <- NULL

obs.fits <- o$rqss.obs.fits
sim.fits <- o$rqss.sim.fits
Expand Down
3 changes: 2 additions & 1 deletion R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ plot.tidyvpcobj <- function(x,
#' single-value groups
#' @noRd
expand_vpc_stats_single_value <- function(vpc, xvar, width = 0.0001) {
n_xvar <- NULL
d_vpc_stats <- vpc$stats
if (!is.null(vpc$strat)) {
d_vpc_stats[, n_xvar := length(unique(get(xvar))), by = names(vpc$strat)]
Expand Down Expand Up @@ -508,7 +509,7 @@ plot_censored <-
show.binning) {

stopifnot(inherits(vpc, "tidyvpcobj"))
hi <- lo <- md <- xbin <- y <- NULL
hi <- lo <- md <- xbin <- y <- x <- xleft <- xright <- blq <- alq <- NULL
. <- list

method <- vpc$vpc.method$method
Expand Down
2 changes: 1 addition & 1 deletion R/vpcstats.R
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ binning <- function(o, ...) UseMethod("binning")
#' @rdname binning
#' @export
binning.tidyvpcobj <- function(o, bin, data=o$data, xbin="xmedian", centers, breaks, nbins, altx, stratum=NULL, by.strata=TRUE, ...) {
keep <- i <- NULL
keep <- i <- ypc <- y <- NULL
. <- list

# If xbin is numeric, then that is the bin
Expand Down

0 comments on commit 3474faf

Please sign in to comment.