subset.mask {secr} | R Documentation

## 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)

### Details

The subscripts in `subset` may be of type integer, character or logical as described in `Extract`.

Covariates are ignored by `rbind.mask`.

### 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'.

### Author(s)

Murray Efford murray.efford@otago.ac.nz

### See Also

`mask`

### Examples

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

[Package secr version 1.2.11 Index]