View source: R/format_plot_data.R
format_plot_data_with_config | R Documentation |
This function runs a tibble through the main data cleanup functions before being displayed in a plot or data table. See those functions for more details.
format_plot_data_with_config(tbl, config)
tbl |
A Tibble data <- dplyr::tribble( ~consortium, ~year, ~month, NA, 2000L, NA, "c1", 20001, "January" ) |
config |
A named list. The list must contained an item named "columns" that has an entry for each column needed in the tibble. Each column must have a "name", and "type" field. Optional fields include "replace_values", "display_name", "na_replace", and "default_replace". The list may also contain an item named drop_na. If the value of drop_na is True, all rows with na values will be droped. The list may also contain an item named unlist_columns. All columns in this list will be un-listed with tidyr::unnest() config <- list( "columns" = list( list( "name" = "consortium", "display_name" = "Consortium", "na_replace" = "Not Applicable", "type" = "character" ), ) ) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.