Description Usage Arguments Value Author(s) See Also Examples
Automated data cleaning. Performs a country mismatch check if the country field is specified, it performs a check to determine if the records are at the appropriate precision for the spatial resolution, it assigns point records to the nearest cell containing environmental data (using nearestcell) and removes records that are in the wrong environment. It flags duplicate records per species per grid cell.
1 2 | quickclean(world,dat, ID = "ID", Species = "Species", x = "x",
y = "y", countries = "", others = "", res, msk, ext)
|
world |
a shapefile of the world, where the column containing the country names must be "NAMES"; see data(wrld_simpl) |
dat |
A dataframe containing the required biogeo fields (see checkdatastr) |
ID |
The unique identifier field |
Species |
The field containing the species names |
x |
x-coordinate in decimal degrees |
y |
y-coordinate in decimal degrees |
countries |
A field containing country names |
others |
Names of other fields that should be retained in the dataframe. |
res |
Spatial resolution for the richness map specified in minutes |
msk |
A mask index of the same spatial resolution as res |
ext |
The extent for the map. This can be ext="p" to use the point data to calculate the extent. It could be an Exent object from the Raster package or a vector containing the following: minx, maxx, miny, maxy. |
Returns a dataframe containing the identifiers (ID), species names (Species), x-coordinate (x), y-coordinate (y), a unique cell index (indx), and duplicates (dups). All records contaning errors in the input dataframe are removed.
Mark Robertson
errorcheck, nearestcell, elevcheck, quickrich
1 2 | dat2<-quickclean(world,dat,ID='ID',Species='Species',x='x',y='y',
countries = '',others='',res=60,msk=msk60,ext="")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.