wbs_expand: Expand wbs

Description Usage Arguments Details Examples

Description

Expand details of a wbs in a data.frame or a wbs vector.

Usage

1
2
3
4
5
6
7
wbs_expand(x, .wbs_col = NULL, ...)

## S3 method for class 'wbs'
wbs_expand(x, ...)

## S3 method for class 'data.frame'
wbs_expand(x, .wbs_col = NULL, ...)

Arguments

x

Object to be expanded.

.wbs_col

If x is of type data.frame then the name of the wbs column. If NULL then default_col_wbs() is used to select the wbs column.

...

Arguments passed to methods.

Details

wbs_expand is a generic function for which methods can be written.

Examples

1
2
3
4
5
x <- as_wbs(c("1", "1.1", "1.1.1", "1.2"))
wbs_expand(x)

df <- data.frame(wbs = x, value = runif(length(x)))
wbs_expand(df)

Technomics/wbstools documentation built on Jan. 28, 2020, 7:10 a.m.