rescale_benefit_2: Rescale outlook Eurobarometer questions

Description Usage Arguments Examples

Description

Rescale the standard Eurobarometer candidate membership benefit variable(s) with categories "Would benefit", "Would not benefit". The generic question is "Taking everything into account, would you say that (OUR COUNTRY) would benefit or not from being a member of the EU?" This is a wrapper function around the rescale_categories function.

Usage

1
2
3
rescale_benefit_2(column, from = c("Would benefit", "Would not benefit"),
  to = c(1, 0), na_labels = "default", exact_from = TRUE,
  return_class = "numeric", underscore = TRUE)

Arguments

column

A column from a survey data frame where gender is recorded.

from

Defaults to "Would benefit", "Would not benefit".

to

Defaults to c(1,0). If return_class = "character" or return_class = "factor" is selected it returns the abbreviated category names c("benefit", "not_benefit".

na_labels

Defaults to c("default").

exact_from

Deafults to TRUE.

return_class

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

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.

Examples

1
2
3
4
5
6
7
8
9
rescale_benefit_2 (column =c("DK",
                             "Would benefit",
                             "Would not benefit"),
                   return_class = "character",
                   underscore = FALSE)

rescale_benefit_2 (column =c("DK","Would benefit",
                             "Would not benefit"),
                   return_class = "numeric")

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