shortenAnswers: Abbreviate verbose answers

Description Usage Arguments Value Author(s) Examples

View source: R/reportFormat.R

Description

Some answer vectors may be too verbose to represent in visual plots. Verbose answers are abbreviated to a string containing the first letter of each word, "not answered" answers remain the same, and "" answers are returned as "not answered"

Usage

1
shortenAnswers(avec, l = 13)

Arguments

avec

Original answer vector (in character or factor format)

l

Maximum length (in characters) of an original answer vector that does not need abbreviation

Value

List with two objects. The first object is the returned abbreviated answer vector. The second object is a glossary key

Author(s)

Xiaoyue Cheng <[email protected]>

Examples

1
2
avec = "The answer is more than l characters"
shortenAnswers(avec, l=13)

introstat/ePort documentation built on May 17, 2017, 4:19 a.m.