bin_lat: Assign fossil occurrences to latitudinal bins
Description
A function to assign fossil occurrences to user-specified latitudinal bins.
Usage
bin_lat(occdf, bins, lat = "lat", boundary = FALSE)
Value
A dataframe of the original input occdf with appended
columns containing respective latitudinal bin information.
Arguments
occdf
dataframe. A dataframe of the fossil occurrences you
wish to bin. This dataframe should contain a column with the
latitudinal coordinates of occurrence data.
bins
dataframe. A dataframe of the bins that you wish to
allocate fossil occurrences to, such as that returned by
lat_bins(). This dataframe must
contain at least the following named columns: "bin", "max" and "min".
lat
character. The name of the column you wish to be treated
as the input latitude (e.g. "lat" or "p_lat"). This column should contain
numerical values. Defaults to "lat".
boundary
logical. If TRUE, occurrences
falling on the boundaries of latitudinal bins will be duplicated and
assigned to both bins.
If FALSE, occurrences will be binned into the upper bin
only (i.e. highest row number).