Learn R Programming

secr (version 2.2.0)

subset.mask: Subset Mask Object

Description

Retain selected rows of a mask object.

Usage

## S3 method for class 'mask':
subset(x, subset, ...)

## S3 method for class 'mask':
rbind(...)

Arguments

x
mask object
subset
numeric or logical vector to select rows of mask
...
two or more mask objects (rbind only)

Value

  • For subset, an object of class `mask' with only the requested subset of rows and `type' attribute set to `subset'. For rbind, an object of class `mask' with all unique rows from the masks in ..., and `type' attribute set to `rbind'.

Details

The subscripts in subset may be of type integer, character or logical as described in Extract. Covariates are ignored by rbind.mask.

See Also

mask

Examples

Run this code
tempmask <- make.mask(make.grid())
OK <- (tempmask$x + tempmask$y) > 100
tempmask <- subset(tempmask, subset = OK)
plot(tempmask)

Run the code above in your browser using DataLab