Learn R Programming

gatoRs (version 1.0.0)

data_chomp: Subset Data - Get species, longitude, and latitude columns

Description

The data_chomp() function "chomps" (subsets) a data frame of occurrence records to only contain the following columns: "species", "longitude", and "latitude". After using this function data will be ready for use in Maxent, for example.

Usage

data_chomp(
  df,
  accepted.name = NA,
  longitude = "longitude",
  latitude = "latitude"
)

Value

Returns data frame with a subset of columns ready for downstream applications such as Maxent.

Arguments

df

Data frame of occurrence records returned from gators_download().

accepted.name

The accepted species name for the records.

longitude

Default = "longitude". The name of the longitude column in the data frame.

latitude

Default = "latitude". The name of the latitude column in the data frame.

Details

This function requires the package dplyr.

Examples

Run this code
chomped_data <- data_chomp(data, accepted.name = "Galax urceolata")

Run the code above in your browser using DataLab