wbs_check: Check is a valid wbs element

Description Usage Arguments Value Examples

View source: R/wbs_tools.R

Description

wbs_check() determines if each element of a character vector is in a valid wbs format.

  1. No empty levels (i.e., no back-to-back occurances of the separator('..')).

  2. Only integers 0-9 and the separator ('.') are allowed.

Usage

1
wbs_check(x, sep = ".", width = NULL)

Arguments

x

Object to be coerced or tested.

sep

Not yet implemented. String to split wbs on. Default is ".". Will not be used if width is specified.

width

Not yet implemented. Integer width that defines a wbs level in the overall string. Overrides sep if a value is given. For example, "010101" may be given to represent 1.1.1. In this case, width = 2.

Value

A logical vector where TRUE signifies a valid entry.

Examples

1
2
x <- c("1", "1.1", "1.1.1", "1.2")
wbs_check(x)

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