add_ident: Generate a suggested Analytica identifier

View source: R/add_ident.R

add_identR Documentation

Generate a suggested Analytica identifier

Description

add_ident() adds a column to the passed tibble of timber, containing an identifier for use in Analytica.

Usage

add_ident(timber, cedar_version = 2)

Arguments

timber

a tibble of timber, with a table built by build_table.

cedar_version

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

Details

Each node in an Analytica model requires an identifier - a unique string, of max 20 characters, with no spaces. add_ident generates the string, which includes the factor (or meta-analysis number), and is based on the title of the node.

The identifier is generated in the format "R00001_name_here" (or "M00001_name_here" if for a meta-analysis result).

Value

The passed tibble of timber with an additional column identifier containing the generated identifiers.


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