Learn R Programming

CUFF (version 1.9)

xyboth: Utility function to match 2 indices

Description

Function %xyb% or xyboth(x, y) shows index present in x, y and both

Usage

x %xyb% y
xyboth(x, y)

Value

Returns a list with indices present only in x and y and in both.

Arguments

x

vector(matrix/dataframe) of indices

y

vector(matrix/dataframe) of indices

Author

Charles-Édouard Giguère

Examples

Run this code
require(CUFF)
xyboth(1:5, 3:6)
### $x
### [1] "1" "2"
### 
### $y
### [1] "6"
### 
### $both
### [1] "3" "4" "5"

Run the code above in your browser using DataLab