rescale_eu2020_goals: Rescale goals Eurobarometer question

Description Usage Arguments Examples

Description

For example, to rescale the standard Eurobarometer EU 2020 goals variable(s) with categories "Too ambitious", "About right", "Too modest". This is a wrapper function around the rescale_categories function.

Usage

1
2
3
rescale_eu2020_goals(column, from = c("Too ambitious", "About right",
  "Too modest"), to = c(-1, 0, 1), na_labels = "default",
  return_class = "numeric", underscore = TRUE)

Arguments

column

A column from a survey data frame where the situtation is recorded with four categories.

from

Defaults to c("Very good", "Fairly good", "Rather bad", "Very bad").

to

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

na_labels

Defaults to "default". The pre-coded profiles can be accessed via get_na_labels.

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
rescale_eu2020_goals (
  column = c("Too ambitious", "Too modest",
            "Inap", "About right"),
  return_class = "character",
  underscore = FALSE)

rescale_eu2020_goals (c("Too ambitious", "Too modest",
                        "Inap", "About right"))

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