Description Usage Arguments Details Value Examples
View source: R/organizeBirds.R
Takes a data.frame and a vector of column names and classifies each row of the data.frame based on the combination of values in the specified columns.
1 2 3 4 5 6 7 | createVisits(
x,
idCols = c("locality", "recordedBy"),
timeCols = c("day", "month", "year"),
grid = NULL,
gridIdCol
)
|
x |
An object of class |
idCols |
A vector with the names of the columns other (than time columns)
that are used to identify a visit. This variable cannot be empty. At least the
recorders name or any other ID must be provided. Default is the Darwin Core
variables |
timeCols |
A vector with the names of the time columns that are used to
identify a visit. If timeCols=NULL then time is ignored to create a visit ID.
Default is the Darwin Core variables |
grid |
Either |
gridIdCol |
column in grid with ids. |
What a visit should be is not always clearly defined and extractable in a
dataset. A reasonable assumption is that a visit could be identified from the
records made by one person on a certain day and at a specific location or site.
The default value for the variable column is therefore that a visit is identified
by the Darwin Core variables c("locality", "day", "month", "year",
"recordedBy")
.
A vector of the same length as the number of rows as the data.frame with a unique number for each combination of the values in the specified columns.
1 2 3 4 5 6 | OB <- organizeBirds(bombusObs)
tmp.vis <- createVisits(bombusObs,
idCols=c("locality", "recordedBy"),
timeCols=c("day", "month", "year"),
gridIdCol = "id")
visits(OB, name = "visNoRecorder", useAsDefault = TRUE) <- tmp.vis
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.