head: First or Last Part of an Object

Description Usage Arguments Details Value See Also Examples

Description

Returns the first or last parts of secr objects

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## S3 method for class 'mask'
head(x, n=6L, ...)
## S3 method for class 'Dsurface'
head(x, n=6L, ...)
## S3 method for class 'traps'
head(x, n=6L, ...)
## S3 method for class 'capthist'
head(x, n=6L, ...)
## S3 method for class 'mask'
tail(x, n=6L, ...)
## S3 method for class 'Dsurface'
tail(x, n=6L, ...)
## S3 method for class 'traps'
tail(x, n=6L, ...)
## S3 method for class 'capthist'
tail(x, n=6L, ...)

Arguments

x

‘mask’, ‘traps’ or ‘capthist’ object

n

a single integer. If positive, size for the resulting object: number of elements for a vector (including lists), rows for a matrix or data frame or lines for a function. If negative, all but the n last/first number of elements of x.

...

other arguments passed to subset

Details

These custom S3 methods retain the class of the target object, unlike the default methods applied to ‘mask’, ‘Dsurface’, ‘traps’ or ‘capthist’ objects.

Value

An object of the same class as x, but (usually) fewer rows.

See Also

head, tail

Examples

1


Search within the secr package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.