Learn R Programming

BIRDS (version 0.2.0)

visits: Get/set the visits

Description

Gets or sets the visits identifier for a OrganizedBirds-class.

Usage

visits(x, name=NULL)

visits(x, name = NULL, useAsDefault = TRUE) <- value

Arguments

x

An OrganizedBirds-object

name

The name of the visit column. Default is NULL, which will get/write to the predefined visit column (visitUID).

useAsDefault

Specifies if the defined column in name should be used as the default column for the visits in further analysis. If name is NULL and useAsDefault = TRUE, value will be written to column (visitUID) and that column will be set to default.

value

the value to assign

Examples

Run this code
# NOT RUN {
ob <- organizeBirds(bombusObs)
attr(ob, "visitCol")
vis <- visits(ob)
tmp.vis <- createVisits(bombusObs,
                        idCols=c("locality"),
                        timeCols = c("day", "month", "year"),
                        gridIdCol = "id")
visits(ob, name = "visNoRecorder", useAsDefault = TRUE) <- tmp.vis
vis2 <- visits(ob)
attr(ob, "visitCol")
# }

Run the code above in your browser using DataLab