import_xls: Import LTVMP monitoring data (Excel workbooks) in R

View source: R/import_xls.R

import_xlsR Documentation

Import LTVMP monitoring data (Excel workbooks) in R

Description

This function imports SEUG long-term vegetation monitoring data from Microsoft Excel workbooks into R.

Usage

import_xls(my_xls)

Arguments

my_xls

A character string of the complete file path of the *.xls file.

Details

This function pulls information and data from the "SiteInfo" and "Data" sheets of the SEUG LTVMP Excel workbook and mungesthem from wide to long format.

Value

A list with three (3) objects.

file_info

This component is a vector that contains the file name, today's date, plot ID, and year the plot was sampled.

sampling_event

This component is a vector that contains the year the plot was sampled, the plot ID, the sample date, and the names of the observers.

data

This component is a data frame in long format.

See Also

read_excel

Examples

## Not run: 
library("dataprocessR")

# List files
my_dir <- "C:/path/to/data"
file_list <- list.files(my_dir, pattern = ".xls", full.names = TRUE,
                        recursive = FALSE)

# Import Excel workbook into R
import_xls(my_xls = file_list[1])

## End(Not run)

scoyoc/dataprocessR documentation built on March 11, 2023, 6:02 a.m.