sign-methods | R Documentation |
Determine if an expression is positive, negative, or zero.
is_zero(object)
is_nonneg(object)
is_nonpos(object)
object |
An Expression object. |
A logical value.
pos <- Constant(1)
neg <- Constant(-1)
zero <- Constant(0)
unknown <- Variable()
is_zero(pos)
is_zero(-zero)
is_zero(unknown)
is_zero(pos + neg)
is_nonneg(pos + zero)
is_nonneg(pos * neg)
is_nonneg(pos - neg)
is_nonneg(unknown)
is_nonpos(-pos)
is_nonpos(pos + neg)
is_nonpos(neg * zero)
is_nonpos(neg - pos)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.