drop,FLArray-method | R Documentation |
Delete the dimensions of an array which have only one level.
## S4 method for signature 'FLArray'
drop(x)
This method calls R's base::drop on the @.Data
slot of an FLArray.
Dimensions of length one are thus dropped, as is the class attribute and the
units
slot, and an array of equal or less
dimensions, a matrix or a vector is returned.
On an FLQuant object with
The FLR Team
base::drop
x <- FLQuant(1:3, dim=c(3,3))
drop(x)
is(drop(x))
dim(drop(x))
# Result of drop can be used for matrix algebra
# for example to calculate aging error
data(ple4)
aging.error <- diag(0.8, 10)
diag(aging.error[-1,]) <- c(rep(0.1, 8), 0.2)
diag(aging.error[, -1]) <- c(0.2, rep(0.1, 8))
t(aging.error) %*% drop(catch.n(ple4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.