Learn R Programming

tilingArray (version 1.50.0)

otherStrand: Return the name of the opposite strand

Description

Return the name of the opposite strand

Usage

otherStrand(x)

Arguments

x
Character vector whose elements are "+" or "-".

Value

Character vector of same length as x, with strands reversed.

Details

This is a rather trivial convenience function.

An alternative would be to code strands with integers -1 and +1, in which case the inversion would be a trivial builtin operation. However, many genomic databases and input data files use the character string / factor notation.

Examples

Run this code
  otherStrand(c("+", "-"))

Run the code above in your browser using DataLab