index2Numeric: Convert index to only numeric values

Description Usage Arguments Value

View source: R/protdata.R

Description

This function converts a vector of indices, which are a potential mixture of numeric values and accessions (characters or even factors) to a vector which retains the numeric indices, but converts accessions to their corresponding index in a provided accessions vector.

Usage

1
index2Numeric(i, accessions)

Arguments

i

A vector of indices (either numeric or a character or factor vector corresponding to elements in the accessions vector).

accessions

A character or factor vector containing accessions.

Value

A numeric vector containing either the original numeric values or the numeric values corresponding to the position of each element of i in the accessions vector.


statOmics/MSqRob documentation built on Nov. 24, 2018, 6:52 a.m.