Skip to contents

Reference a list of continental areas to remove them from the dataframe output by ssarp::find_areas().

Usage

remove_continents(occs)

Arguments

occs

The dataframe that is returned by ssarp::find_areas(). I do not recommend using a custom dataframe for this function because it references areas given by the area database used in ssarp::find_areas(). If you must use a custom dataframe, please ensure that the landmass areas are in a column called "areas"

Value

A dataframe of the species name, island name, and island area (without continents)

Examples

# The GBIF key for the Anolis genus is 8782549
# Read in example dataset filtered from:
#  dat <- rgbif::occ_search(taxonKey = 8782549,
#                           hasCoordinate = TRUE,
#                           limit = 10000)
dat <- read.csv(system.file("extdata",
                            "ssarp_Example_Dat.csv",
                            package = "ssarp"))
#> Warning: file("") only supports open = "w+" and open = "w+b": using the former
#> Error in read.table(file = file, header = header, sep = sep, quote = quote,     dec = dec, fill = fill, comment.char = comment.char, ...): no lines available in input
occs <- find_land(occurrences = dat)
#> Error: object 'dat' not found
areas <- find_areas(occs = occs)
#> Error: object 'occs' not found
new_areas <- remove_continents(areas)
#> Error: object 'areas' not found