mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-08 00:06:51 -05:00
- array_mode new parameter merge for return value behaviour - updated expression documentation for array_mode, majority and minority - updated tests
17 lines
859 B
Plaintext
17 lines
859 B
Plaintext
{
|
|
"name": "array_mode",
|
|
"type": "function",
|
|
"groups": ["Arrays"],
|
|
"description": "Return the most common values in an array. The returned array may contain more than one value if multiple values occur equally often.",
|
|
"arguments": [
|
|
{"arg":"array","description":"an array"},
|
|
{"arg":"merge='all'", "optional":true, "description":"a string specifyng the return values handling. By default all values are returned in an array. Valid options are:<br /><ul><li>all</li><li>first</li><li>median</li></ul>"}
|
|
],
|
|
"examples": [
|
|
{ "expression":"array_mode(array(0,1,42,42,43))", "returns":"[ 42 ]"},
|
|
{ "expression":"array_mode(array(0,0,1,2,2,42))", "returns":"[ 0, 2 ]"},
|
|
{ "expression":"array_mode(array(0,1,42,42,43), 'first')", "returns":"42"},
|
|
{ "expression":"array_mode(array(0,1,1,2,2,42), 'median')", "returns":"1.5"}
|
|
]
|
|
}
|