summarize.two.way.comparisons.percentage.overlap: Summarize Percentage Overlap for Two-Way Comparisons between...

Description Usage Arguments Value Examples

Description

Summarize Percentage Overlap for Two-Way Comparisons between Vectors

Usage

1
2
3
  summarize.two.way.comparisons.percentage.overlap(named_list_of_vectors_to_compare,
  output_type = "table", melt_table = FALSE, network_graph_minimum = 0,
  margins_for_plot = NULL)

Arguments

named_list_of_vectors_to_compare

A named list of vectors to compare (see, for example, example.vectors.list). Duplicate values in a given vector will only be counted once (for example, c("a", "a", "b", "c") will be treated identically to c("a", "b", "c").

output_type

Either "table", "matrix_plot", or "network_graph". "table" will return a matrix showing percentage overlap between each pair of vectors. "matrix_plot" will plot this table, coloring it by the amount of overlap. "network_graph" will return a network graph image illustrating the overlap percentages between each pair of vectors.

melt_table

A logical (TRUE/FALSE) indicator, when output_type is "table", whether to print the output in melted form (using the reshape2 package).

network_graph_minimum

minimum argument from qgraph, for when output_type is "network_graph".

margins_for_plot

The margins for image output (if output_type is matrix_plot or network_graph). Specified as a vector of numbers, in the form c(bottom, left, top, right). If output_type is matrix_plot, defaults to c(2, 0, 1, 0); if output_type is network_graph, defaults to c(3, 3, 3, 0.5).

Value

Either a matrix (if output is "table"), or an image (if output is "matrix_plot" or "network_graph"). If an image is printed, nothing is returned by the function; rather, the output is printed immediately.

If output is "table" and melt_table is FALSE, the output will be a matrix with nrow and ncol both equal to the number of vectors in named_list_of_vectors_to_compare. This table shows the decimal percentage overlap (e.g., "0.20" = 20%) between each combination of vectors. This table is intended to be read with row names first, in this form: "[row title] overlaps with [column title] [cell value] percent."

If output is "table" and melt_table is TRUE, the output will be a melted data.frame with three columns: Vector_Name, Overlaps_With, and Decimal_Percentage.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

veccompare documentation built on May 2, 2019, 7:29 a.m.