compTwoVecs: Compare two vectors by set operations

Description Usage Arguments Value Author(s) Examples

View source: R/set.R

Description

Basic set operations are used to compare two vectors

Usage

1
compTwoVecs(vec1, vec2)

Arguments

vec1

A vector of atomic types, e.g. integers, characters, etc.

vec2

A vector of the same type as vec1

Value

A vector of six integer elements

vec1.setdiff

Number of unique items only in vec1 but not in vec2

intersect

Number of items in both vec1 and vec2

vec2.setdiff

Number of unique items only in vec2 but not in vec1

vec1.ulen

Number of unique items in vec1

vec2.ulen

Number of unique items in vec2

union

Number of unique items in vec1 and vec2

Author(s)

Jitao David Zhang <jitao_david.zhang@roche.com>

Examples

1
2
3
year1 <- c("HSV", "FCB", "BVB", "S04", "FCN")
year2 <- c("HSV", "FCK", "S04")
compTwoVecs(year1, year2)

ribiosUtils documentation built on March 13, 2020, 2:54 a.m.