Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_cosoilmoist_from_NASIS

Read and Flatten the Component Soil Moisture Tables


Description

Read and flatten the component soil moisture month tables from a local NASIS Database.

Usage

get_cosoilmoist_from_NASIS(
  SS = TRUE,
  impute = TRUE,
  stringsAsFactors = default.stringsAsFactors(),
  dsn = NULL
)

Arguments

SS

fetch data from the currently loaded selected set in NASIS or from the entire local database (default: TRUE)

impute

replace missing (i.e. NULL) values with "Not_Populated" for categorical data, or the "RV" for numeric data or 201 cm if the "RV" is also NULL (default: TRUE)

stringsAsFactors

logical: should character vectors be converted to factors? This argument is passed to the uncode() function. It does not convert those vectors that have set outside of uncode() (i.e. hard coded). The 'factory-fresh' default is TRUE, but this can be changed by setting options(stringsAsFactors = FALSE)

dsn

Optional: path to local SQLite database containing NASIS table structure; default: NULL

Details

The component soil moisture tables within NASIS house monthly data on flooding, ponding, and soil moisture status. The soil moisture status is used to specify the water table depth for components (e.g. status == "Moist").

Value

A data.frame.

Note

This function currently works only on Windows.

Author(s)

S.M. Roecker

See Also

Examples

if(local_NASIS_defined()) {
 # load cosoilmoist (e.g. water table data)
 test <- try(get_cosoilmoist_from_NASIS())

 # inspect
 if(!inherits(test, 'try-error')) {
   head(test)
 }
}

soilDB

Soil Database Interface

v2.6.1
GPL (>= 3)
Authors
Dylan Beaudette [aut], Jay Skovlin [aut], Stephen Roecker [aut], Andrew Brown [aut, cre]
Initial release
2021-04-7

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.