R/deprecated.R

Defines functions embed_chr_table_html embed_cat_table embed_cat_prop_plot

Documented in embed_cat_prop_plot embed_cat_table embed_chr_table_html

#' Embed Interactive Categorical Plot (DEPRECATED!)
#'
#' This function has been deprecated.
#' Use instead [makeme()]
#'
#' @param data `data.frame`, `tibble` or potentially a `srvyr`-object.
#' @param dep `tidyselect`-syntax for dependent variable(s).
#' @param indep `tidyselect`-syntax for an optional independent variable.
#' @param colour_palette Character vector. Avoid using this.
#' @param mesos_group String
#' @param html_interactive Flag, whether to include interactivity.
#' @param inverse Flag, whether to flip plot or table.
#' @param ... Dynamic dots, arguments forwarded to underlying function(s).
#'
#' @importFrom rlang !!!
#' @export
#'
embed_cat_prop_plot <-
  function(data,
           ...,
           dep = tidyselect::everything(),
           indep = NULL,
           colour_palette = NULL,
           mesos_group = NULL,
           html_interactive = TRUE,
           inverse = FALSE) {

    dots <- rlang::list2(...)

    lifecycle::deprecate_soft(
      when = "1.1.0",
      what = "embed_cat_prop_plot()",
      with = "makeme(type = 'cat_prop_plot_html')"
    )

    makeme(
      data = data,
      type = "cat_prop_plot_html",
      !!!dots)

  }


#' Embed Reactable Table (DEPRECATED!)
#'
#' This function has been deprecated.
#' Use instead [makeme()]
#'
#' @inheritParams embed_cat_prop_plot
#' @importFrom rlang !!!
#'
#' @export
embed_cat_table <-
  function(data,
           ...,
           dep = tidyselect::everything(),
           indep = NULL,
           mesos_group = NULL) {

    dots <- rlang::list2(...)


    lifecycle::deprecate_soft(
      when = "1.1.0",
      what = "embed_cat_prop_plot()",
      with = "makeme(type='cat_table_html')"
    )

    makeme(
      data = data,
      type = "cat_table_html",
      !!!dots)
  }


#' Interactive table of text data (DEPRECATED)
#'
#' This function has been deprecated.
#' Use instead [makeme()]
#'
#' @inheritParams embed_cat_prop_plot
#' @importFrom rlang !!!
#' @export
#'
embed_chr_table_html <-
  function(
    data,
    dep,
    ...,
    mesos_group = NULL) {


    dots <- rlang::list2(...)

    lifecycle::deprecate_soft(
      when = "1.1.0",
      what = "embed_chr_table_html()",
      with = "makeme(type = 'chr_table_html')"
    )

    makeme(
      data = data,
      type = "chr_table_html",
      !!!dots)
}

Try the saros package in your browser

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

saros documentation built on June 8, 2025, 10:43 a.m.