powered by
Extension of standard max and min functions with which rank position(s) can be specified and result can be either rank or value.
max
min
MAX(vector, rank = 1, value = FALSE, rank.adjust = TRUE, forceChoice = FALSE)
Vector in which maximum/minimum element needs to be identified
value(s) or rank(s) of maximum values.
Should value or rank be returned?
If maximum value of range of ranks exceeds vector length, should this be adjusted?
In case of ties, should all results be returned or only one?
numeric vector (either value or rank)
If minimum value (of a range of) rank(s) exceeds vector length, results are meaningless.
MIN, NOUNS, SITUATION, SELECTVERB, SELECTACTOR, SELECTUNDERGOER, REFCHECK, TOPICCOPY, GENERALIZE, CHECKSUCCESS, ANALYZE, TYPEMATCH, NOUNMORPHOLOGY, VERBMORPHOLOGY, INTERPRET.INT, INTERPRET, NOUNDESEMANTICIZATION, VERBDESEMANTICIZATION, SEMUPDATE, DIE
MIN
NOUNS
SITUATION
SELECTVERB
SELECTACTOR
SELECTUNDERGOER
REFCHECK
TOPICCOPY
GENERALIZE
CHECKSUCCESS
ANALYZE
TYPEMATCH
NOUNMORPHOLOGY
VERBMORPHOLOGY
INTERPRET.INT
INTERPRET
NOUNDESEMANTICIZATION
VERBDESEMANTICIZATION
SEMUPDATE
DIE
# NOT RUN { a=rep(1:10, 2) MAX(a, rank=1:3, value=TRUE, forceChoice=TRUE) MIN(a, rank=1:3, value=TRUE, forceChoice=TRUE) # }
Run the code above in your browser using DataLab