getIndex: get Index of variable 'var' in vector 'vect'

Description Usage Arguments Examples

Description

This method is used internally. If no index is found with which (this can happen because of numerical issues), the less efficient method all.equal is used to check for "nearly" equality.

Usage

1
getIndex(var, vect)

Arguments

var

element that one expects to be part of vect

vect

vector

Examples

1
2
3
getIndex("c", letters)
getIndex(5.0000001, 2:6) # error
getIndex(5.00000001, 2:6) # difference is small enough to be found by all.equal

CharlotteJana/pdmppoly documentation built on Sept. 4, 2019, 4:40 p.m.