tail,FLQuant-method | R Documentation |
Standard tail and head methods can be applied along any dimension of an FLQuant object.
## S4 method for signature 'FLQuant'
tail(x, n = 1, dim = 2, ...)
## S4 method for signature 'FLQuant'
head(x, n = 1, dim = 2, ...)
x |
The object to extract from, FLQuant. |
n |
The number of elements to extract, numeric. |
dim |
Dimension to extract from, defaults to 2, 'year'. |
An FLQuant with the extracted elements.
Iago Mosqueira (WMR)
base::tail
x <- FLQuant(1:10)
# Extract the last 3 years
tail(x, 3)
# Extract all but the first 3 years
tail(x, -3)
# Extract the first 3 years
head(x, 3)
# Extract all but the last 3 years
head(x, -3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.