set_blade_depth: Generate a mapping of timber column names to their...

View source: R/set_blade_depth.R

set_blade_depthR Documentation

Generate a mapping of timber column names to their standardized names and expected data types

Description

set_blade_depth() generates a named vector, where the raw timber's column names are stored as values, and the names mapped to those values correspond to the standardized column names. It also generates a vector of the expected data type for each timber column.

@param cedar_version numeric [1,2]: the version of CEDAR that created the export.

@details The set_blade_depth() maps original, non-standardized timber column names to standardized timber column names – for both versions of CEDAR. These column names are provided in an external .CSV: /inst/raw_data/import_filter.csv. The expected data types (i.e. "numeric", "text") are also provided by this external .CSV.

@return A list containing a named vector and a "value-only" vector.

@importFrom readr cols read_csv @importFrom tidyr drop_na @importFrom dplyr pull

@export

Usage

set_blade_depth(cedar_version = 2)

iAM-AMR/sawmill documentation built on June 30, 2024, 2:25 a.m.