ListTools[Occurrences] - number of occurrences in a list
|
Calling Sequence
|
|
Occurrences(x, L)
Occurrences(x, L, f, opts)
|
|
Parameters
|
|
x
|
-
|
anything
|
L
|
-
|
list
|
f
|
-
|
(optional) boolean valued procedure
|
opts
|
-
|
(optional) extra arguments to procedure f
|
|
|
|
|
Description
|
|
•
|
The Occurrences(x, L) command returns the number of entries in the list L which equal x using a boolean comparison.
|
|
If a function f is provided, equality is tested using f(x, L[i], opts) for each element in the list.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
The number of entries approximately equal to 3.263.
>
|
|
| (3) |
|
|
Download Help Document
Was this information helpful?