| has_mixed_signs | R Documentation |
Determines whether a numeric vector contains both negative and positive
values. Zero (0) is treated as neutral and does not count as either sign.
has_mixed_signs(x)
x |
( |
TRUE if the vector contains both positive and negative values,
FALSE otherwise.
# internal functions (not exported) – examples skipped
## Not run:
has_mixed_signs(1:5)
has_mixed_signs(-(1:5))
has_mixed_signs(c(-1, -2, 3))
has_mixed_signs(c(0, -1))
has_mixed_signs(c(0, 1))
has_mixed_signs(c(0, 1, -1))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.