visits: Get/set the visits

Description Usage Arguments Examples

View source: R/organizeBirds.R

Description

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

Usage

1
2
3
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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")

BIRDS documentation built on June 27, 2021, 1:06 a.m.