Skip to content

Commit

Permalink
fix for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
rolkra committed Nov 12, 2024
1 parent 763fe20 commit 7583a08
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/explore.R
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,10 @@ explore_col <- function(data, var_label, var_value,
flip = NA,
color = "#ADD8E6") {

# define variables for CRAN-package check
label <- NULL
value <- NULL

# check parameters
check_data_frame_non_empty(data)
if (ncol(data) < 2) {
Expand Down Expand Up @@ -2037,15 +2041,15 @@ explore_col <- function(data, var_label, var_value,
stop("var_value must be a numeric variable")
}

# replance NA values (is wanted)
# replace NA values (if wanted)
if (!is.na(na)) {
data[val_txt] <- ifelse(is.na(data[[val_txt]]), na, data[[val_txt]])
}

data_plot <- data[ , c(lab_txt, val_txt)]
names(data_plot) <- c("label", "value")

#- if no title is provided, use default
# if no title is provided, use default
if (is.na(title) | nchar(title == 0)) {
title <- lab_txt
}
Expand Down

0 comments on commit 7583a08

Please sign in to comment.