| MAX {MoLE} | R Documentation |
Find maximum value
Description
Extension of standard max and min functions with which rank position(s) can be specified and result can be either rank or value.
Usage
MAX(vector, rank = 1, value = FALSE, rank.adjust = TRUE, forceChoice = FALSE)
Arguments
vector |
Vector in which maximum/minimum element needs to be identified |
rank |
value(s) or rank(s) of maximum values. |
value |
Should value or rank be returned? |
rank.adjust |
If maximum value of range of ranks exceeds vector length, should this be adjusted? |
forceChoice |
In case of ties, should all results be returned or only one? |
Value
numeric vector (either value or rank)
Warning
If minimum value (of a range of) rank(s) exceeds vector length, results are meaningless.
Author(s)
Sander Lestrade
See Also
MIN, NOUNS, SITUATION, SELECTVERB, SELECTACTOR, SELECTUNDERGOER, REFCHECK, TOPICCOPY, GENERALIZE, CHECKSUCCESS, ANALYZE, TYPEMATCH, NOUNMORPHOLOGY, VERBMORPHOLOGY, INTERPRET.INT, INTERPRET, NOUNDESEMANTICIZATION, VERBDESEMANTICIZATION, SEMUPDATE, DIE
Examples
a=rep(1:10, 2)
MAX(a, rank=1:3, value=TRUE, forceChoice=TRUE)
MIN(a, rank=1:3, value=TRUE, forceChoice=TRUE)