mcds.filter: Filter data before using it with mcds.wrap

Description Usage Arguments Details Author Examples

View source: R/mcds.filter.R

Description

Allow to change the names of the column of a data.frame so that it work seamlessly with mcds.wrap

Usage

1
2
3
4
5
mcds.filter(x, transect.id = "WatchID", distance.field = "Distance",
  distance.labels = c("A", "B", "C", "D"), distance.midpoints = c(25,
  75, 150, 250), effort.field = "WatchLenKm", lat.field = "LatStart",
  long.field = "LongStart", sp.field = "Alpha", date.field = "Date",
  distanceLabel.field = "Distance", dist2m = TRUE)

Arguments

x

A data.frame containing observations.

transect.id

Name of the column containing the unique ID of each transect.

distance.field

Name of the column containing the distance classes of each observations.

distance.labels

Classes of distance to keep for the analysis.

distance.midpoints

Midpoints in (m) of the classes of distance kept for the analysis.

effort.field

Name of the column containing the length of the transect/watch.

lat.field

Name of the column containing the latitude of the observations.

long.field

Name of the column containing the longitude of the observations.

sp.field

Name of the column containing the species ID.

date.field

Name of the column containing the date for the observations.

dist2m

Boolean to indicate if the conversion from classes to numeric should be performed.

distanceLabels.field

Name of the column containing the distance classes for filtering.

Details

When "WatchLenKm" = 0, observations are eliminated. Transects for which "Alpha" = "" (no species names) will be kept because they are transects that were done but where no observations were recorded. Observations for which there is no distance or coordinates will be eliminated. The "Date" column will be transformed in the yyyy-mm-dd format.

Author

Christian Roy

Examples

1
2
3
4
5
data(quebec)
x<- mcds.filter(quebec, transect.id = "WatchID", distance.field = "Distance", distance.labels = c("A", "B", "C", "D"), 
                  distance.midpoints = c(25, 75, 150, 250), effort.field = "WatchLenKm", lat.field = "LatStart", 
                  long.field = "LongStart", sp.field = "Alpha", date.field = "Date")
str(x)

RoyChristian/R2MCDS documentation built on Jan. 13, 2020, 8:17 p.m.