rescale_good_bad_3: Rescale 3-level good-bad evaluation.

Description Usage Arguments Examples

Description

Rescale 3-level categorical variables "A good thing", "Neither good nor bad" and "A bad thing". This is a wrapper function around the the rescale_categories function.

Usage

1
2
3
rescale_good_bad_3(column, from = c("A good thing", "Neither good nor bad",
  "A bad thing"), to = c(1, 0, -1), na_labels = c("NA", "DK"),
  underscore = TRUE, exact_from = TRUE, return_class = "numeric")

Arguments

column

A column from a survey data frame where level of being acceptable is recorded with only three levels.

from

Defaults to c("good", "none", "bad").

to

Defaults to c(1,0,-1) )

na_labels

Defaults to c("NA","DK")

underscore

Defaults to TRUE in which case factor names or character strings contain underscore_between_words. This is a better approach for further programming, but you can choose FALSE for nicer printing results. See examples.

exact_from

Deafults to TRUE. If FALSE you can use the partial matching, but beware that in this case, "twenty" will be replaced by

return_class

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

Examples

1
2
3
rescale_good_bad_3 (column = c(
 "A good thing", "Neither good nor bad", "A bad thing","NA", "DK")
 )

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