Learn R Programming

BGSIMD (version 1.0)

part: Partition Sets of Two Sets

Description

The function computes the three partition sets of two sets. That is, given two sets A and B, the function returns the set of A-B, AB and B-A where AB is the intersection of A and B, A-B=the intersection of A and B complement.

Usage

part(ms1, ms2)

Arguments

ms1
A numeric vector. The first set
ms2
A numeric vector. The second set

Value

A list consisting of the three partition sets.

See Also

setdiff, intersect, and partition

Examples

Run this code
ms1<-c(1,3,7,9,10)
ms2<-c(7,9,10,12,13)
part(ms1,ms2) 

Run the code above in your browser using DataLab