comparelists: Return the intersect, difference and union between 2 vectors

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This is a very simple function which compares two vectors, x and y. It returns the intersection and unique lists. It is useful for comparing two genelists.

Usage

1
2
3
comparelists(dx,dy, ...)
## S3 method for class 'comparelists'
print(x, ...)

Arguments

dx,dy

A vector.

x

An object from comparelists.

...

further arguments passed to or from other methods.

Details

reports on the intersect, difference and union between two lists.

Value

An object of class comparelists:

intersect

Vector containing the intersect between x and y

Set.Diff

Vector containing the elements unique to X obtained using setdiff

XinY

Numeric, indicating the number of elements of x in y

YinX

Numeric, indicating the number of elements of y in x

Length.X

Numeric, the number of elements in x

Length.Y

Numeric, the number of elements in y

...

Further arguments passed to or from other methods

Author(s)

Aedin Culhane

See Also

See also intersect, setdiff

Examples

1
2
3
4
5
a<-sample(LETTERS,20)
b<-sample(LETTERS,10)
z<-comparelists(a,b)
z$Set.Diff
z$intersect

SamGG/made4 documentation built on Sept. 29, 2020, 1:33 p.m.