Question-Text: Get and Set Variable Question Text

Description Usage Arguments Value Examples

Description

Generic method for retreiving and assinging the question text associated with a column in a svy_df object associated with a survey question.

Usage

1
2
3
qtext(x)

qtext(x) <- value

Arguments

x

a single column in a svy_df object, or a survey data frame of class svy_df to return all variable question text for.

value

character: A string containing the full wording of a survey item to assign to the question text attribute of x.

Value

An object identical to x with the 'qtext' attribute containing question text, or for questions, a two column data frame with the column names of the data in the first column and the associated question text of each in the second.

Examples

1
2
3
4
5
6
7
8
## Not run: 
## Show the current question text for a column
qtext(data$nr1)

## Assign the question text to a variable
qtext(data$nr1) <- 'yolo

## End(Not run)

alexdulin/MCmrp documentation built on May 11, 2019, 11:29 p.m.