Description Usage Arguments Value See Also Examples
Delete the dimensions of an array which have only one level.
1 | drop(x)
|
x |
an array (including a matrix). |
If x
is an object with a dim
attribute (e.g., a matrix
or array
), then drop
returns an object like
x
, but with any extents of length one removed. Any
accompanying dimnames
attribute is adjusted and returned with
x
: if the result is a vector the names
are taken from
the dimnames
(if any). If the result is a length-one vector,
the names are taken from the first dimension with a dimname.
Array subsetting ([
) performs this reduction unless used
with drop = FALSE
, but sometimes it is useful to invoke
drop
directly.
drop1
which is used for dropping terms in models.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.