renamefields: Rename particular fields in a dataframe

Description Usage Arguments Value Author(s) See Also Examples

Description

Several functions require a particular set of columns in the dataframe with specific names. If the columns in the dataframe do not have these names then they can be renamed. The fields that can be renamed include: ID (unique identifiers), x (x-coordinate), y (y-coordinate), Species (the species names column)

Usage

1
renamefields(dat, ID = "ID", x = "x", y = "y", Species = "Species")

Arguments

dat

a dataframe containing the point records dataset

ID

the identifiers column

x

the x-coordinates (longitude) in decimal degrees

y

the y-coordinates (latitude) in decimal degrees

Species

the species names

Value

a dataframe in which the selected fields have been renamed

Author(s)

Mark Robertson

See Also

checkdatastr, addmainfields

Examples

1
2
dat<-data.frame(places,Speciesnames="")
a<-renamefields(dat, ID = "id", x = "long", y = "lat", Species = "Speciesnames")

biogeo documentation built on May 1, 2019, 8:05 p.m.