R/imports.R

Defines functions as_tibble_col

#' @import ggplot2
#' @importFrom dplyr arrange case_when filter group_by if_else left_join mutate
#' @importFrom dplyr select tribble summarise ungroup pull distinct right_join
#' @importFrom dplyr desc lead tibble lag slice_head across bind_rows between
#' @importFrom dplyr all_of rename first semi_join inner_join
#' @importFrom rlang .env abort warn inform %||% has_name
#' @importFrom glue glue
#' @importFrom scales manual_pal
NULL

utils::globalVariables(c(
  "market_share",
  "palette_colours",
  "scenario_colours",
  "sector_colours",
  "technology_colours",
  "where",
  ":="
))

# Re-implement tibble::as_tibble_col to avoid adding tibble to Imports
as_tibble_col <- function(x, column_name = "value") {
  tibble(`:=`(!!column_name, x))
}

Try the r2dii.plot package in your browser

Any scripts or data that you put into this service are public.

r2dii.plot documentation built on May 31, 2023, 6:46 p.m.