Description Usage Arguments Details Value Author(s) See Also Examples
Simple functions to test for or return the even or odd numbers.
1 2 3 4 |
x |
any numeric, but maybe makes the most sense with integers. |
Return a logical vector/matrix of the same dimension as the argument x
telling whether each component is odd (is.odd
) or even (is.even
), or return just the even (even
) or odd (odd
) numbers from the vector/matrix. Uses %%
.
Returns a logical vector/matrix/array of the same dimension as x in the case of is.even and is.odd, and returns a vector of length less than or equal to x in the case of even and odd; or if no even/odd values, returns integer(0).
Eric Gilleland
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.