matchsub {GWENA} | R Documentation

## Functions from NetRep packages

### Description

Sources: https://github.com/sritchie73/NetRep CRAN page: https://cran.r-project.org/web/packages/NetRep Package licence: GPL-2

### Usage

    x %nin% table

    x %sub_in% table

    x %sub_nin% table

### Arguments

`x` | vector or `NULL`: the values to be matched. Long vectors are supported.
`table` | vector or `NULL`: the values to be matched against. Long vectors are not supported.

### Details

Reason of the copy: the contingency function weren't exported from NetRep package and neither CRAN or Bioconductor allows to use un-exported function through the ':::' operator.

Note: functions description have been modified from the original work Value Matching and Subsetting

This set of functions provides shortcuts for value matching and subsetting, on top of the functionality provided by `%in%`.

`%nin%` returns a logical vector indicating if elements of `x` are not in `table`, This is the opposite of `%in%`.

`%sub_in%` returns the elements `x` that are `%in%` `table` rather than a logical vector.

`%sub_nin%` returns the elements `x` that are `%nin%` `table` rather than a logical vector.

### Value

A vector of the same length as x.

[Package GWENA version 1.2.0 Index]