Import data into MERMAID Collect. By default this function just checks records to see if they can successfully be imported into Collect - if not, a warning is returned with import errors. If there are no import errors, then running the function again with the setting dryrun = FALSE will actually import the records into Collect.

mermaid_import_project_data(
  data,
  project,
  method = c("fishbelt", "benthicpit", "benthiclit", "benthicpqt", "habitatcomplexity",
    "bleaching"),
  dryrun = TRUE,
  clearexisting = FALSE,
  token = mermaid_token()
)

Arguments

data

Data to import. Either a data frame or a file path.

project

A way to identify the project(s). Can be project IDs (passed as a character vector directly) or projects resulting from mermaid_get_my_projects or mermaid_search_my_projects. Defaults to the projects listed via mermaid_get_default_project, if available.

method

Method to import data for. One of "fishbelt", "benthiclit", "benthicpit", "benthicpqt", "bleaching", "habitatcomplexity"

dryrun

Whether the import is a dry run. If TRUE, records are checked for errors, but nothing is saved in Collect. If FALSE, records are checked for errors and passing records ARE saved to Collect. Defaults to TRUE.

clearexisting

Whether to remove ALL existing records for that method. Should only be used with extreme caution, if e.g. you made a mistake in import and want to overwrite ALL existing fishbelt / benthic PIT / etc records.

token

API token. Authenticate manually via mermaid_auth, or automatically when running any project- or user-specific functions (like this one).