Description Usage Arguments Value Examples
Split a vector or a list in 2 groups, given a predicate function.
1 | partition(x, predicate)
|
x |
vector or list to partition. |
predicate |
a function returning a boolean value, to apply to each element of x. |
A list of two elements. The first element contains elements of x satisfying the predicate, the second the rest of x. Missing values will be discarded.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.