Learn R Programming

vecsets (version 1.4)

Like Set Tools in 'Base' Package but Keeps Duplicate Elements

Description

The 'base' tools union() intersect(), etc., follow the algebraic definition that each element of a set must be unique. Since it's often helpful to compare all elements of two vectors, this toolset treats every element as unique for counting purposes. For ease of use, all functions in vecsets have an argument 'multiple' which, when set to FALSE, reverts them to the base::sets (alias for all the items) tools functionality.

Copy Link

Version

Install

install.packages('vecsets')

Monthly Downloads

250

Version

1.4

License

LGPL-3

Maintainer

Carl Witthoft

Last Published

December 2nd, 2023

Functions in vecsets (1.4)

vperm

Calculate all permutations of all combinations of a specified size from a data object.
vintersect

Perform intersection of two vectors, including counting repeated elements.
vecsets-package

An extension of the base tools such as 'intersect' which does not reduce to unique elements
vsetdiff

Find all elements in first argument which are not in second argument.
vunion

Returns the union of its inputs including repeated elements.
vsetequal

Check whether two vectors contain exactly the same collection of elements.