read_benchmarkgroups: Reading in benchmark groups from the Data Explorer

View source: R/reading.R

read_benchmarkgroupsR Documentation

Reading in benchmark groups from the Data Explorer

Description

This will read in a table of benchmark group membership formatted like the Evaluation Information spreadsheet in the Data Explorer Excel workbook (wide, one variable per benchmark group with "X" designating membership and NA indicating no membership). Returns a tall version as a data frame with the unique identifier variables intact and

Usage

read_benchmarkgroups(
  path = getwd(),
  filename = NULL,
  id_var = c("TerrADat Primary Key/LMF Plot Key"),
  sheet = "Evaluation Information",
  ignore_var = c("GlobalID")
)

Arguments

path

Character string. The path to the folder containing the file filename OR the full filepath to the file itself if filename = NULL. Defaults to the working directory as retrieved by getwd().

filename

Character string. The full filename plus extension for the file containing the benchmark groups, if it is not part of the string provided as path. Normally this will be a .xls, .xlsx, or .xlsm file, although a .csv file will also work. Defaults to NULL.

id_var

Vector of character strings. One or more character strings corresponding to the variable(s) that contain the unique identifiers for the data frame. Because the assumption is that this function will be used on the Data Explorer Excel workbook, defaults to c("TerrADat Primary Key/LMF Plot Key").

sheet

Optional character string. A character string corresponding to the name of the spreadsheet to read from an Excel workbook if that's the target filetype. Ignored if the target file is a .csv. Because the assumption is that this function will be used on the Data Explorer Excel workbook, defaults to c("Evaluation Information").

ignore_var

Vector of character strings. One or One or more character strings corresponding to the variable(s) that contain NEITHER the unique identifiers NOR benchmark group membership in the data frame. Because the assumption is that this function will be used on the Data Explorer Excel workbook, defaults to c("GlobalID").


nstauffer/aim.analysis documentation built on Nov. 2, 2023, 12:52 a.m.