Learn R Programming

vbracket (version 1.1.0)

Custom Legends with Statistical Comparison Brackets

Description

Add publication-quality custom legends with vertical brackets. Designed for displaying statistical comparisons between groups, commonly used in scientific publications for showing significance levels. Features include adaptive positioning, automatic bracket spacing for overlapping comparisons, font family inheritance, and support for asterisks, p-values, or custom labels. Compatible with 'ggplot2' graphics.

Copy Link

Version

Install

install.packages('vbracket')

Version

1.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Yoshiaki Sato

Last Published

January 23rd, 2026

Functions in vbracket (1.1.0)

draw_legend_with_brackets

Create a custom legend with vertical brackets
print_vbracket_plot

Print a ggplot with vbracket overlay
print.gg

Print method for ggplot objects with vbracket legend
ggsave_vbracket

Save a ggplot with vbracket legend
legend_bracket

Add legend with brackets to a ggplot object
plot_with_custom_legend

Add custom legend with brackets to a ggplot
ggplot_add.vbracket_legend

Add vbracket legend to ggplot
add_bracket_comparisons

Create comparison specification for vbracket
p_to_symbol

Get standard significance symbols from p-values
create_annotation_legend_grob

Create a self-contained vbracket legend grob for annotation_custom
validate_comparisons

Validate comparison data frame