NWCA16_import: NWCA16_import: Import NWCA 2016 data from file

View source: R/NWCA16_import.R

NWCA16_importR Documentation

NWCA16_import: Import NWCA 2016 data from file

Description

This function imports all data files from the NWCA2016 from a zip or individual files as data frames. Metadata files are not imported. Each data frame is either added to the global environment or to an environment named NWCA16, based on whether new_env = TRUE or FALSE.

Usage

NWCA16_import(path = NA, new_env = TRUE, zip_name = NA, ACAD_only = TRUE)

Arguments

path

Quoted path of folder containing data files.

new_env

Logical. Specifies which environment to store data frames in. If TRUE(Default), stores data frames in NWCA16 environment. If FALSE, stores data frames in global environment

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.

ACAD_only

Logical. If TRUE, only imports ACAD sentinel sites. If FALSE, imports full dataset.

Value

NWCA16 data files as data frames in specified environment

Examples

## Not run: 

# Import using default of adding new environment, not using zip file, and including only ACAD sites.
NWCA16_import(path = "../data/NWCA16")

# Import all sites from zip file into global environment
NWCA16_import(path = "../data/NWCA16", new_env = FALSE,
              zip_name = "NWCA2016_data.zip", ACAD_only = FALSE)


## End(Not run)


KateMMiller/wetlandACAD documentation built on Dec. 21, 2024, 1:14 a.m.