spThinnerToFile: Spatially thin a set of eBird records

Description Usage Arguments Details Value References

Description

Wrapper to lapply sample.grid.cell over multiple files.

Usage

1
2
3
spThinnerToFile(xxx, yyy, lat.col, long.col, xlim = c(NA, NA), ylim = c(NA,
  NA), nx, ny, jitter = FALSE, size, replace = FALSE, read.wd, write.wd,
  cores)

Arguments

xxx

Either E-W coordinates, or the word "extent". If extent is desired, make sure to specify for both xxx & yyy. Function will not handle mixture gracefully.

yyy

Either N-S coordinates, or the word "extent". If extent is desired, make sure to specify for both xxx & yyy. Function will not handle mixture gracefully.

lat.col

The name of the latitude column in the files.

long.col

The name of the longitude column in the files.

xlim

Together xlim and ylim define a bounding box within which lookup occurs. I.e. all (xxx, yyy) pairs outside of this box are ignored.

ylim

Together xlim and ylim define a bounding box within which lookup occurs. I.e. all (xxx, yyy) pairs outside of this box are ignored.

nx

Number of grid cells in x direction.

ny

Number of grid cells in y direction.

jitter

Defaults to FALSE. Set to TRUE to randomize grid location.

size

Maximum number of points per cell to sample

replace

Defaults to FALSE. Set to TRUE to sample with replacement.

read.wd

Path to the read directory, where the files to be thinned are found.

write.wd

Path to the write directory.

cores

How many cores to use for parallel processing.

Details

This lapplies sample.grid.cell() to a series of eBird files. The read directory should contain only files to be cleaned, will not gracefully handle other types of files. Important note–depending on how the arguments are passed in, sample.grid.cell creates a grid unique to the minimum/maximum lat/long of the input data. So, grids with the same parameters will be applied to each file in the read working directory. Unless the input files have identical extents, or unless fixed coordinates are provided, this means that the actual size and spacing of the grid will change between files. Some preliminary tests are in order to ensure what works for your data.

Value

Spatially thinned csv files written to the write directory.

References

Team eBird.


eliotmiller/ebirdr documentation built on May 14, 2019, 10:33 a.m.