create a local taxonomic database

td_create(
  provider = getOption("taxadb_default_provider", "itis"),
  schema = c("dwc", "common"),
  version = latest_version(),
  overwrite = FALSE,
  lines = 1e+05,
  dbdir = taxadb_dir(),
  db = td_connect(dbdir)
)

Arguments

provider

a list (character vector) of provider to be included in the database. By default, will install itis. See details for a list of recognized provider. Use provider="all" to install all available provider automatically.

schema

One of "dwc" (for Darwin Core data) or "common" (for the Common names table.)

version

Which version of the taxadb provider database should we use? defaults to latest. See available_versions for details.

overwrite

Should we overwrite existing tables? Default is FALSE. Change to "ask" for interactive interface, or TRUE to force overwrite (i.e. updating a local database upon new release.)

lines

number of lines that can be safely read in to memory at once. Leave at default or increase for faster importing if you have plenty of spare RAM.

dbdir

a location on your computer where the database should be installed. Defaults to user data directory given by [rappdirs::user_data_dir].

db

connection to a database. By default, taxadb will set up its own fast database connection.

Value

path where database has been installed (invisibly)

Details

Authorities currently recognized by taxadb are:

Examples

# \donttest{ # \dontshow{ ## All examples use a temporary directory Sys.setenv(TAXADB_HOME=tempdir()) # } ## Install the ITIS database td_create("itis") ## force re-install: td_create("itis", overwrite = TRUE)
#> Warning: overwriting 2019_dwc_itis
#> Importing /tmp/RtmpUiM8jB/2019_dwc_itis.tsv.bz2 in 100000 line chunks:
#> ...Done! (in 35.93204 secs)
#> Warning: overwriting 2019_common_itis
#> Importing /tmp/RtmpUiM8jB/2019_common_itis.tsv.bz2 in 100000 line chunks:
#> ...Done! (in 10.2027 secs)
# }