rescale_alphanumeric_en: Rescale alphanumeric variables in English

Description Usage Arguments Examples

Description

Create a numeric (or other) variable from alphanumeric coding, such as "twenty", "twenty-one".
This is a wrapper function around therescale_categories function.

Usage

1
2
rescale_alphanumeric_en(column, from = NULL, to = NULL,
  na_labels = c("default"), return_class = "numeric")

Arguments

column

A column from a survey data with a four-level agreement scale.

from

Defaults to c("NULL") in which case the numbers 0-40 and 45 are coded, for example, from "Twenty-one".

to

Defaults to c(0:40,41,NA).

na_labels

Defaults to c("default").

return_class

Default is "numeric", alternatives "character" or "factor".

Examples

1
2
3
rescale_alphanumeric_en  (column = c("One", "Twenty",
                           "twenty-one", "sEven", "NA"),
                          na_labels = "default")

antaldaniel/surveyreader documentation built on May 16, 2019, 2:29 a.m.