polyID {secr} | R Documentation

## Polygon Identifier

### Description

Extract or replace polygon dentifier from an object of class 'traps'.

### Usage

    polyID(object)
    polyID(object) <- value

### Arguments

`object` | an object with attribute 'polyID'
`value` | a factor of length equal to nrow(object)

### Details

These functions assign and extract the attribute of a 'traps' object that assigns vertices (rows) to particular polygons.

### Value

a factor with one level per polygon

### Author(s)

Murray Efford murray.efford@otago.ac.nz

### See Also

`traps`

### Examples

    ## default is a single polygon
    temp <- make.grid(detector = 'polygon', hollow = T)
    polyID(temp)
    plot(temp)

    ## split in two
    temp <- make.grid(detector = 'polygon', hollow = T)
    polyID(temp) <- factor(rep(c(1,2),rep(10,2)))
    plot(temp)

[Package secr version 1.3.0 Index]