There are two ways to access and use the gbif4crest calibration dataset, which are illustrated here with a simple PSE file.
crest_ex_pse #> Level Family Genus Species ProxyName #> 1 3 Randomaceae Randomus Taxon1 Taxon1 #> 2 3 Randomaceae Randomus Taxon2 Taxon2 #> 3 3 Randomaceae Randomus Taxon3 Taxon3 #> 4 3 Randomaceae Randomus Taxon4 Taxon4 #> 5 3 Randomaceae Randomus Taxon5 Taxon5 #> 6 3 Randomaceae Randomus Taxon6 Taxon6 #> 7 3 Randomaceae Randomus Taxon7 Taxon7
The first option consists in using the default option: connecting to
the online gbif4crest. This is the simplest option and users
only have to provide the name of the database to the field
dbname = "gbif4crest_02".
reconstr <- crest.get_modern_data( pse = PSE, taxaType = 1, climate = c("bio1", "bio12"), # The name of the online database dbname = "crest_example", verbose = FALSE )
tapply(reconstr$modelling$taxonID2proxy[,1], reconstr$modelling$taxonID2proxy[,2], length) #> Taxon1 Taxon2 Taxon3 Taxon4 Taxon5 Taxon6 #> 1 1 1 1 1 1
This option is usually much faster but it requires downloading the full database in a zipped format from [here]. Once unzipped, the file, which is about ~23Gb, should be saved in a location of interest.
reconstr <- crest.get_modern_data( pse = PSE, taxaType = 1, climate = c("bio1", "bio12"), # The full path to the local database # Or place the database in the working # directory. dbname = "path/to/gbif4crest_02.sqlite3", verbose = FALSE )
The local calibration database file can be saved anywhere and named in any way. The file extension ‘.sqlite3’ is, however, the only difference between the online and the offline options. It is thus crucial to call the file database.sqlite3 to orient the package in the right direction.