View source: R/generalHelpers.R
compare2vectors | R Documentation |
This function takes two vectors and displays how many elements are in one, in the other, or in both as well as which ones are only in one of the two vectors.
compare2vectors(v1, v2, showInBoth = FALSE)
v1 |
the first vector to compare |
v2 |
the second vector to compare |
showInBoth |
whether or not to display the values found in both vectors. Default is FALSE |
a list containing (1) a data frame with various counts (2) a vector with elements only in the first vector (3) a vector with elements only in the second vector (4) if showInBoth == TRUE, a vector with elements found in both vectors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.