Turtle, Observer, Patch

mode-of-turtles-with [condition] [list of commands]

Parameters:
[condition] List of turtle commands list of commands that evaluate to true or false
[list of commands] List of turtle commands list of commands to that evaluate to a number

Description:
Returns the mode of the [list of commands] when evaluated across all the turtles that satisfy the [condition]

Examples:
mode-of-turtles-with [color = red] [speed] returns the mode of the speed of all the red turtles.

Notes:
Note: If [list of commands] contains no numbers, an error occurs. If some of the [list of commands], when evaluated, are not numbers, those values are ignored.

Note: When a turtle calls the command, it is not included as part of the calculation.

Related Commands:
average-of-turtles-with max-of-turtles-with median-of-turtles-with min-of-turtles-with mode-of-breed-with mode-of-turtles sdev-of-turtles-with sum-of-turtles-with variance-of-turtles-with