Learn R Programming

occUncertain (version 0.1.0)

generate_occ_uncertain: Random latitude and longitude coordinates accounting uncertainty values

Description

generate_occ_uncertain Given a data frame of georeferenced occurrences this function generates a new set of coordinates with added uncertainty.

Usage

generate_occ_uncertain(
  occs_df,
  lat_col = "latitude",
  lon_col = "longitude",
  lat_uncertainty = "latitude_uncertainty",
  lon_uncertainty = "longitude_uncertainty",
  taxa_col = "species"
)

Value

random_dd A data.frame of a random latitude, random longitude and taxa name for each occurence record.

Arguments

occs_df

A data.frame of occurrence locations that includes at least these four columns - latitude, longitude, latitude uncertainty and longitude uncertainty in degrees.

lat_col

Name of column of latitude dbl values. Caps sensitive.

lon_col

Name of column of longitude dbl values. Caps sensitive.

lat_uncertainty

Name of column of latitude uncertainty in degree values. Caps sensitive.

lon_uncertainty

Name of column of longitude uncertainty in degree values. Caps sensitive.

taxa_col

Name of column of taxa (species) values. Caps sensitive.

Details

Input as a dataframe should have the following structure:

[,1]ddlatnumeric, latitude (in decimal degrees)[,2]ddlon
numeric, longitude (in decimal degrees)[,3]ddlat uncnumeric, longitude uncertainty (in decimal degrees)[,4]
ddlon uncnumeric, longitude uncertainty (in decimal degrees)[,5]taxcharacter or factor, taxa names

It is mandatory to respect field positions, but field names do not matter