Skip to content

Commit

Permalink
642 unused functions (#659)
Browse files Browse the repository at this point in the history
Closes #642.

Removed `substitute_q` and `extract_input`.
Added `@keywords internal` to `is_num_var_short`.
  • Loading branch information
chlebowa authored Feb 21, 2024
1 parent 3bd9b71 commit c57bc17
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 48 deletions.
6 changes: 0 additions & 6 deletions R/tm_g_bivariate.R
Original file line number Diff line number Diff line change
Expand Up @@ -703,12 +703,6 @@ bivariate_plot_call <- function(data_name,
)
}

substitute_q <- function(x, env) {
stopifnot(is.language(x))
call <- substitute(substitute(x, env), list(x = x))
eval(call)
}


#' Create ggplot part of plot call
#'
Expand Down
2 changes: 1 addition & 1 deletion R/tm_variable_browser.R
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,6 @@ var_missings_info <- function(x) {
#'
#' @return character variable containing the HTML code of the \code{sparkline} HTML widget
#' @keywords internal
#'
create_sparklines <- function(arr, width = 150, ...) {
if (all(is.null(arr))) {
return("")
Expand Down Expand Up @@ -1025,6 +1024,7 @@ plot_var_summary <- function(var,
plot_main
}

#' @keywords internal
is_num_var_short <- function(.unique_records_for_factor, input, data_for_analysis) {
length(unique(data_for_analysis()$data)) < .unique_records_for_factor && !is.null(input$numeric_as_factor)
}
Expand Down
18 changes: 0 additions & 18 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -190,24 +190,6 @@ varname_w_label <- function(var_names,
}
}

#' Extract html id for `data_extract_ui`
#' @description The `data_extract_ui` is located under extended html id.
#' We could not use \code{ns("original id")} for reference, as it is extended with specific suffixes.
#' @param varname character original html id.
#' This will be mostly retrieved with \code{ns("original id")} in `ui` or
#' \code{session$ns("original id")} in server function.
#' @param dataname character \code{dataname} from data_extract input.
#' This might be retrieved like \code{teal.transform::data_extract_spec(...)[[1]]$dataname}.
#' @param filter logical if the connected \code{extract_data_spec} is used with \code{filter} option.
#' @keywords internal
extract_input <- function(varname, dataname, filter = FALSE) {
if (filter) {
paste0(varname, "-dataset_", dataname, "_singleextract-filter1-vals")
} else {
paste0(varname, "-dataset_", dataname, "_singleextract-select")
}
}

# see vignette("ggplot2-specs", package="ggplot2")
shape_names <- c(
"circle", paste("circle", c("open", "filled", "cross", "plus", "small")), "bullet",
Expand Down
23 changes: 0 additions & 23 deletions man/extract_input.Rd

This file was deleted.

0 comments on commit c57bc17

Please sign in to comment.