setdiff {matlab2r}R Documentation

Set differences of two arrays

Description

Loosely replicates the behavior of the homonym Matlab function

Usage

setdiff(A, B, legacy = FALSE)

Arguments

A

first array

B

second array

legacy

if TRUE, preserves the behavior of the setdiff function from MATLAB R2012b and prior releases. (currently not supported)

Value

An array containing he elements which are in A but not in B

Author(s)

Waldir Leoncio

Examples

A <- c(3, 6, 2, 1, 5, 1, 1)
B <- c(2, 4, 6)
setdiff(A, B)

[Package matlab2r version 1.5.0 Index]