Nothing
col_expr_has_cta <-
function(col_expr, cta_name = c("identity", "bin", "count", "avg")) {
cta_name <- match.arg(cta_name)
cta_name_to_class_mapping <- list(
identity = new_sgl_cta_identity(),
bin = new_sgl_cta_bin(),
count = new_sgl_cta_count(),
avg = new_sgl_cta_avg()
)
identical(cta_name_to_class_mapping[[cta_name]], col_expr$cta)
}
filter_col_exprs_by_cta <-
function(col_exprs, cta_name = c("identity", "bin", "count", "avg")) {
cta_name <- match.arg(cta_name)
purrr::keep(
col_exprs,
~ col_expr_has_cta(.x, cta_name)
)
}
filter_agg_exprs <- function(col_exprs) {
col_exprs[
purrr::map_lgl(col_exprs, ~ (is_aggregation(.$cta)))
]
}
all_aesthetics <- function(rgs) {
layer_aesthetics <- purrr::map(
rgs$layers,
~ names(.$aes_mappings)
)
unique(unlist(layer_aesthetics))
}
column_from_aes <- function(layer, df, aes) {
col_name_from_aes <- layer$aes_mappings[[aes]]$column
df[[col_name_from_aes]]
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.