Learn R Programming

biogeo (version 1.0)

keepmainfields: Keep main fields in a dataframe.

Description

Select main fields required by biogeo.

Usage

keepmainfields(dat, ID = "", Species = "", x = "", y = "", others = "")

Arguments

dat
A dataframe containing records including an identifier field, a species name field, x- and y-coordinates fields and any other fields.
ID
The unique identifier field
Species
The field containing the species names
x
x-coordinate in decimal degrees
y
y-coordinate in decimal degrees
others
Names of other fields that should be retained in the dataframe

Value

A dataframe containing the selected fields.

See Also

addmainfields, renamefields, checkdatastr

Examples

Run this code
names(gbifdat)
dat3 <- keepmainfields(gbifdat, Species='species', x='decimallongitude', y='decimallatitude')

Run the code above in your browser using DataLab