Withr mimic of with_options() for ComplexHeatmap options
Source:R/jamenrich-with-ht-opts.R
with_ht_opts.RdWithr mimic of with_options() for ComplexHeatmap options
Usage
with_ht_opts(new, code)
local_ht_opts(.new = list(), ..., .local_envir = parent.frame())Arguments
- new
listnamed by heatmap option, with corresponding values as described inComplexHeatmap::ht_opt().- code
anyvalid R code to execute in the temporary environment.
Details
This function uses the same mechanism as used by withr::with_options()
except focuses on options defined by ComplexHeatmap::ht_opt().
See also
Other jam utility functions:
ashape(),
avg_angles(),
avg_colors_by_list(),
cell_fun_bivariate(),
collapse_mem_clusters(),
colorRamp2D(),
curateIPAcolnames(),
deconcat_df2(),
display_colorRamp2D(),
enrichList2geneHitList(),
find_colname(),
find_enrich_colnames(),
get_hull_data(),
get_igraph_layout(),
gsubs_remove(),
handle_igraph_param_list(),
isColorBlank(),
make_legend_bivariate(),
make_point_hull(),
mem_find_overlap(),
order_colors(),
rank_mem_clusters(),
rotate_coordinates(),
summarize_node_spacing(),
xyAngle()
Examples
ComplexHeatmap::ht_opt("COLUMN_ANNO_PADDING")
#> [1] 1mm
#> 1mm
with_ht_opts(list(COLUMN_ANNO_PADDING=grid::unit(3, "mm")),
ComplexHeatmap::ht_opt("COLUMN_ANNO_PADDING"))
#> [1] 3mm
#> 3mm
ComplexHeatmap::ht_opt("COLUMN_ANNO_PADDING")
#> [1] 1mm
#> 1mm
test_local <- function() {
local_ht_opts(list(COLUMN_ANNO_PADDING=grid::unit(3, "mm")))
print(ComplexHeatmap::ht_opt("COLUMN_ANNO_PADDING"))
}
test_local()
#> [1] 3mm
#> 3mm
ComplexHeatmap::ht_opt("COLUMN_ANNO_PADDING")
#> [1] 1mm
#> 1mm