Description Usage Arguments Value Examples
View source: R/FunctionLatLondataprep.R
This function removes absence data (as the models generate their own pseudo-absences), subset the data based on year and allows modelling of GB and Northern Ireland using latitude and longitude coordinates. A presence record is assumed to be denoted as "present" by the column "Occurrence status" in NBN Atlas data.
1 2 3 4 5 | latlonprep(speciesdf, xCol = "Latitude (WGS84)",
yCol = "Longitude (WGS84)",
precisionCol = "Coordinate uncertainty (m)", yearCol = "Year",
minyear = 0, maxyear = 0, mindata = 500, covarRes = 300,
GBonly = TRUE, presencecol = F)
|
speciesdf |
Data frame exported from the NBN atlas with data for a species. |
xCol |
The column name of the column in |
yCol |
The column name of the column in |
precisionCol |
The column name of the column in |
yearCol |
The column name in |
minyear |
Numeric, the earliest year from which data should be selected. Year inclusive, data older than this will be discarded. |
maxyear |
Numeric, the latest year from which data should be used. Year inclusive, data newer than this will be discarded. |
mindata |
The target minimum number of data points to return. If this is specified, the lowest resolution data will be discarded if there are enough higher resolution data points available to reach this target. |
covarRes |
The resolution of the environmental covariate data layers, in metres. Data will not be discarded if it is of higher resolution than the environmental covariate layers. |
GBonly |
logical, TRUE if you wish to remove Northern Ireland from the records, FALSE if you wish to retain all records. |
presencecol |
logical, TRUE if a column is present defining whether it is a presence or absence which has been recorded, Those not noted as 'present' will be removed. FALSE is the default and will assume all data present are presence records. |
A copy of speciesdf
as a data frame with absence data removed, subset to your year range and area of interest.
1 2 3 4 | data(ng_data)
names(ng_data)[26] <- "Decimal longitude (WGS84)"
latlonprep(speciesdf = ng_data, xCol = "Decimal latitude (WGS84)", yCol = "Decimal longitude (WGS84)", precisionCol = "Coordinate uncertainty in metres", yearCol = "Year", minyear = 2000, maxyear = 2007, GBonly = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.