size-methods | R Documentation |
Determine if an expression is a scalar, vector, or matrix.
is_scalar(object)
is_vector(object)
is_matrix(object)
object |
An Expression object. |
A logical value.
x <- Variable()
y <- Variable(3)
z <- Variable(3,2)
is_scalar(x)
is_scalar(y)
is_scalar(x + y)
is_vector(x)
is_vector(y)
is_vector(2*z)
is_matrix(x)
is_matrix(y)
is_matrix(z)
is_matrix(z - x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.