make_legend_with_stats {dotsViolin}R Documentation

Make legends with stats

Description

This function merges all columns in a dataframe to be used as legends

Usage

make_legend_with_stats(
  data,
  namecol,
  start_column_idx = 2,
  first_justified_left = FALSE
)

Arguments

data

dataframe with columns to be merged into 1

namecol

name to be given to new column

start_column_idx

numeric index of first column to process

first_justified_left

boolean when TRUE justifies first column to the left, defaults to FALSE

Value

data.frame with combined source columns

Examples

fabaceae_mode_counts <- get_modes_counts(fabaceae_clade_n_df, "clade", "parsed_n")
fabaceae_clade_n_df_count <- make_legend_with_stats(fabaceae_mode_counts, "label_count", 1, TRUE)
fabaceae_Cx_mode_counts_per_clade_df <- get_peaks_counts_continuous(
  fabaceae_clade_1Cx_df,
  "clade", "Cx", 2, 0.25, 1, 2
)
namecol <- "labelcountcustom"
fabaceae_clade_1Cx_modes_count_df <- make_legend_with_stats(
  fabaceae_Cx_mode_counts_per_clade_df,
  namecol, 1, TRUE
)

[Package dotsViolin version 0.0.1 Index]