SECOND function returns a new set containing the domains of an existing set that has the second highest score.
In the examples below domain labels are also shown, in brackets, to facilitate understanding.
For example, if the hidden results table is the one in the introduction, this snippet:
var workingSet = SET(["1.07", "1.18", "1.01"]); var mySet = SECOND(workingSet);
will define and populate
mySet this way:
In this other example:
var workingSet = SET(["1.16", "1.17", "1.18"]); var mySet = SECOND(workingSet);
the function returns an empty set because none of the
workingSet domains have a score.
Since the only domains with a score are those listed in the hidden results table, only a domain with a matching entry in that table can be returned.
In case of two or more domains having the same score, the last in alphabetical order is chosen.
The syntax is:
set is a set variable.