decompose_itemnames: Decomposes item names into their four components

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/decompose_itemnames.R

Description

This utility function decomposes item names into components: instrument, domain, mode and number

Usage

1

Arguments

x

A character vector containing item names (gcdg lexicon)

Details

The gsed-naming convention is as follows. Position 1-3 codes the instrument, position 4-5 codes the domain, position 6 codes direct/caregiver/message, positions 7-9 is a item sequence number.

Value

A data.frame with length(x) rows and four columns, named: instrument, domain, mode, and number.

Author(s)

Stef van Buuren

References

https://docs.google.com/spreadsheets/d/1zLsSW9CzqshL8ubb7K5R9987jF4YGDVAW_NBw1hR2aQ/edit#gid=0

See Also

sort_itemnames()

Examples

1
2
itemnames <- c("aqigmc028", "grihsd219", "", "by1mdd157", "mdsgmd006")
decompose_itemnames(itemnames)

dscore documentation built on Nov. 29, 2020, 1:07 a.m.