venndir_to_df: Convert venndir output to data.frame

venndir_to_dfR Documentation

Convert venndir output to data.frame

Description

Convert venndir output to data.frame or kable format for visual review.

Usage

venndir_to_df(
  venndir_out,
  return_type = c("kable", "data.frame"),
  trim_blanks = TRUE,
  wrap_width = 80,
  colorize_headers = TRUE,
  set_colors = NULL,
  ...
)

Arguments

venndir_out

list output from venndir()

return_type

character string indicating how to format output:

  • "kable": returns an object "knitr_kable" suitable for printing as HTML or LaTeX. This output is recommended for RMarkdown documents.

  • "data.frame": returns a data.frame object without colorization.

trim_blanks

logical whether to remove rows with 0 items.

wrap_width

numeric maximum width for item text before it is word-wrapped. To disable word-wrapping use wrap_width=Inf.

colorize_headers

logical indicating whether to color the background of each header by the set_colors.

...

additional arguments are ignored.

Details

Todo:

  • Accept input from signed_overlaps() for purely table summary.

Value

object of class "data.frame" or "knitr_kable" based upon argument return_type.

See Also

Other venndir utility: curate_venn_labels(), expand_range(), get_venn_shapes(), gridtext_make_outer_box(), gridtext_richtext_grob(), make_color_contrast(), make_venn_combn_df(), make_venn_test(), match_list(), nudge_venndir_label(), print_color_df(), shrink_df(), three_point_angle(), venndir_label_style(), venndir_legender()

Examples

setlist <- venndir::make_venn_test(100, 3);
venndir_out <- venndir::venndir(setlist, overlap_type="each")
kdf <- venndir_to_df(venndir_out)
kdf

kdf <- venndir_to_df(venndir_out, return_type="data.frame")
kdf


jmw86069/venndir documentation built on June 15, 2024, 1:52 p.m.