jj_compare_vectors: quantify number of common elements between two or more...

View source: R/jj_compare_vectors.R

jj_compare_vectorsR Documentation

quantify number of common elements between two or more vectors

Description

jj_compare_vectors returns a data.frame specifying how many elements of vector A are present in B and vice versa jj_plot_upsetr uses the UpSetR:upset function to plot overlaps between vectors passed as a list jj_make_overlap_df returns a list: key_table mapping the names of the list to letters and overlaps, a data.frame with the elements that are present in each combination of vectors passed as a list

Usage

jj_compare_vectors(A, B)

Arguments

A

first vector

B

second vector

list_of_vectors

list of vectors to be compared

mainbar.y.label

Passed to upset function, default: 'Intersection Size',

mb.ratio

Passed to upset function, default: c(0.55, 0.45)

Examples

vec_list = list(group1= 1:5, group2= 2:4, group3 = c(3,6), group4=5:10, group5=12)
jj_compare_vectors(A=vec_list[[1]], B=vec_list[[2]])
jj_plot_upsetr(vec_list)
jj_make_overlap_df(vec_list)

mathosi/jj documentation built on Feb. 25, 2024, 2:29 p.m.