If genus names are used as input in getextr, there is an error in open.connection, e.g.
> #function to get GBIF data and extract climate or environmental data for each occurrence
> vec1_data <- getextr(c("Larix"), climrast, maxrec = 500000, schema = "flat", repo = c("gbif"), nmin = 15)
[1] "Larix"
GBIF Error in open.connection(con, "rb"): HTTP error 400.
[1] "There are records in this query from gbif for Larix"
If other genera are provided, these also fail.
If a species name is provided instead, no error is thrown.
#function to get GBIF data and extract climate or environmental data for each occurrence
> vec1_data <- getextr(c("Larix occidentalis"), climrast, maxrec = 500000, schema = "flat", repo = c("gbif"), nmin = 15)
[1] "Larix occidentalis"
New names:
* NA -> ...1
* NA -> ...2
* NA -> ...3
* NA -> ...4
New names:
* NA -> ...1
* NA -> ...2
* NA -> ...3
* NA -> ...4
New names:
* NA -> ...1
* NA -> ...2
* NA -> ...3
* NA -> ...4
New names:
* NA -> ...1
* NA -> ...2
* NA -> ...3
* NA -> ...4
New names:
* NA -> ...1
* NA -> ...2
* NA -> ...3
* NA -> ...4
[1] "There are 724 records in this query from gbif for Larix occidentalis"
Aggregate Raster for flat or species filtering
Begin flat aggregate sampling... 1
Taxon list of lenth: 1
If genus names are used as input in getextr, there is an error in open.connection, e.g.
If other genera are provided, these also fail.
If a species name is provided instead, no error is thrown.