Turtle, Observer, Patch

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

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

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

Examples:
mode-of-patches-with [color = red] [food] returns the mode of the food of all the red patches.

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.

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