tempStand: Temporal standardisation of occurrence data

Description Usage Arguments Value See Also Examples

Description

Expand a dataframe of occurrence by year range so that there is a separate record for each year. Also check for duplicated year / location combinations.

occurrence should be a dataframe with columns named Start_Year, End_Year, Admin, Latitude and Longitude giving the start and end years of the date range, the admin level (0 to 3, or -999 for points) and the latitude and longitude of points or centroids. A SourceID column should also be present, giving a unique identifier for each of the input records. If a column of this name is not present one will be added. A UniqueID column is also added, giving a unique identifier for each record after the temporal standardisation.

GAUL codes for each record are required to check for duplicates. If these are provided as a column named GAUL in occurrence, then this is used, otherwise getGAUL is used to extract the GAUL codes from admin (a RasterBrick or RasterStack object giving the GAUL codes at different admin levels) and add them to occurrence.

tempStand returns a list giving the expanded dataframe and row indices for the duplicated points and polygons.

Usage

1

Arguments

occurrence

A dataframe of occurrence data containing the columns Start_Year, End_Year, Admin, Latitude and Longitude and preferably SourceID and GAUL.

admin

A RasterBrick or RasterStack object with four layers giving the GAUL codes for different admin levels. The layers must be in the order 0, 1, 2, 3, as they are in the example object admin.

verbose

Whether to print information to the console.

Value

A list with three elements:

occurrence

An expanded dataframe of occurrence data with individual records for each year. The columns Start_Year and End_Year are removed and columns Year and UniqueID are added (as well as SourceID and GAUL if they weren't already present). Note that this dataframe still contains the duplicate records, which the user should deal with before continuing.

duplicated_polygons

A vector giving the row numbers of the output element occurrence which contain duplicated polygon / year combinations. Note that only the first identical element is not listed.

duplicated_points

A vector giving the row numbers of the output element occurrence which contain duplicated point / year combinations. Points are considered to be duplicates if they fall in the same pixel of admin. Note that the first of the identical elements is not listed.

See Also

getGAUL, duplicated

Examples

1
# TO DO

SEEG-Oxford/seegSDM documentation built on May 9, 2019, 11:08 a.m.