formatData: Format scheme records for use in soaR

View source: R/SDMFunctions.R

formatDataR Documentation

Format scheme records for use in soaR

Description

This function subsets scheme data by years, and converts UK or NI grid cells to eastings and northings on the OSGB36 coordinate reference system.

Usage

formatData(occ, taxa, minYear, maxYear, degrade = TRUE)

Arguments

occ

String. data.frame with occurrence records. Must have columns "YEAR", "CONCEPT" (species name) and one of "TO_GRIDREF" or "SQ_1KM".

taxa

string. Taxonomic group. There must be a file in inPath that contains the taxonomic group name.

minYear

Numeric. Drop all records prior to this year.

maxYear

Numeric. Drop all records later than this year.

degrade

Logical. Whether or not to degrade the data from all records to uniqe species/ location records.

Value

A dataframe with four columns: species, year, eastings and northings.


robboyd/soaR documentation built on April 24, 2022, 9:44 a.m.