format_plot_data_with_config: Format Plot Data With Config

View source: R/format_plot_data.R

format_plot_data_with_configR Documentation

Format Plot Data With Config

Description

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.

Usage

format_plot_data_with_config(tbl, config)

Arguments

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" ), ) )


Sage-Bionetworks/projectliveModules documentation built on June 26, 2022, 1:11 a.m.