importCSV | R Documentation |
This function imports all views in the ANALYSIS schema of the NETN_Forest backend that have been previously exported as .csvs or a zip file using the exportCSV() function. Each view is added to a VIEWS_NETN environment in your workspace, or to your global environment based on whether new_env = TRUE or FALSE.
importCSV(path = NA, new_env = TRUE, zip_name = NA)
path |
Quoted path of folder containing tables. |
new_env |
Logical. Specifies which environment to store views in. If |
zip_name |
Quoted string ending in .zip. If specified, function looks for the specified file name and imports .csvs from the zip file. If not specified, function looks for and imports individual csvs. Note that this takes slightly longer than loading individual .csvs, due to the unzipping process. |
NETN database views in specified environment
## Not run:
#' # Import data package from IRMA and import into R
devtools::install_github('nationalparkservice/NPSutils') # takes awhile- lots of dependencies
NPSutils::get_data_package(2306029)
importCSV("./data/2306029")
# Import individual csvs into global environment
importCSV(path = "C:/Forest_Health/exports/NETN", new_env = FALSE)
# Import zipped csvs into VIEWS_NETN environment
path <- "C:/Forest_Health/exports/NETN"
importCSV(path = path, zip_name = "NETN_Forest_20210406.zip")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.