Package 'soilDBdata'

Title: Create static data snapshots for soilDB unit tests and comparisons
Description: The goal of soilDBdata is to provide standard methods for building and provisioning test data sets for the soilDB R package. These datasets are stored as SQLite, JSON, CSV in the inst/extdata folder and are buildable by standard methods. Building datasets from scratch may require access to a local instance of a NASIS database with relevant tables populated.
Authors: Soil and Plant Science Division Staff
Maintainer: Andrew G. Brown <[email protected]>
License: GPL-3
Version: 0.1.7
Built: 2025-02-26 01:19:41 UTC
Source: https://github.com/brownag/soilDBdata

Help Index


Create a SQLite Database

Description

Create a SQLite Database

Usage

create_SQLite(
  output_path = tempfile(fileext = ".sqlite"),
  tables = NULL,
  SS = FALSE
)

create_fetchNASIS_pedons(
  output_path = tempfile(fileext = ".sqlite"),
  tables = c("area", "site", "pedon", "transect", "metadata", "lookup", "nasis"),
  SS = NULL
)

create_fetchNASIS_components(
  output_path = tempfile(fileext = ".sqlite"),
  tables = c("area", "legend", "mapunit", "datamapunit", "component", "metadata",
    "lookup", "nasis"),
  SS = NULL
)

create_fetchVegdata(
  output_path = tempfile(fileext = ".sqlite"),
  tables = c("area", "site", "pedon", "transect", "vegetation", "metadata", "lookup",
    "nasis"),
  SS = NULL
)

Arguments

output_path

Output SQLite file

tables

Passed to 'soilDB::get_NASIS_table_name_by_purpose(purpose = ...)' with and without 'SS = TRUE'

SS

Use Selected Set ('..._View_1') tables? TRUE = "yes", FALSE = "no", 'NULL' for "both" selected set and full local database tables

Value

SQLite file written to 'output_path'