Assign fossil occurrences to latitudinal binsSource:
A function to assign fossil occurrences to user-specified latitudinal bins.
dataframe. A dataframe of the fossil occurrences you wish to bin. This dataframe should contain a column with the latitudinal coordinates of occurrence data.
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".
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".
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).
A dataframe of the original input
occdf with appended
columns containing respective latitudinal bin information.
# Load occurrence data occdf <- tetrapods # Generate latitudinal bins bins <- lat_bins(size = 10) # Bin data occdf <- bin_lat(occdf = occdf, bins = bins, lat = "lat") #> Presence of occurrences falling on boundaries detected. #> Occurrences assigned to upper bin.