expand_stcvs: Expand stanford classic variable strings

View source: R/sfclassic_general.R

expand_stcvsR Documentation

Expand stanford classic variable strings

Description

This function takes a tibble having stanford classic variable values, and expands these to single observations in a tibble (ala data frame) All stanford variables in the input tibble should preferably have equal number of observations.

Usage

expand_stcvs(tibbl)

Arguments

tibbl

a tibble having one row and any number of columns. Each single 'tibbl[1,j]' is a string containing zero, one, or multiple variable values, and where text variables are preceded by a newline and where numeric variables are separated by a space

Value

a tibble, equal number of variables as input tibble.

Examples

stanford_classic_variable_strings <-
tibble::tibble(speciescode = "1 2 3", speciesname = "\nspruce\npine\nbirch")
expand_stcvs (stanford_classic_variable_strings)

hbelbo/stanfordclassicr documentation built on Dec. 23, 2024, 2:45 p.m.