rescale_marital_status: Rescale the Eurobarometer marital status variable.

Description Usage Arguments Examples

Description

If you only need a simpler categorization, use the 4- or 5- category versions of this variable. This is a truly categorical variable. The return_class="factor" and return_class="character" give shorthened versions of the GESIS labels for easier handling in R. This is a wrapper function around the rescale_categories function.

Usage

1
2
rescale_marital_status(column, from = NULL, to = NULL,
  na_labels = c("default"), return_class = "factor", underscore = TRUE)

Arguments

column

A column from a survey data with the subjective urbanization answers.

from

Defaults to c("NULL") in which case the GESIS coding in English c("Widow/er: living without children","Single living w partner: without children" ... will be used. The GESIS coding is not same across files.

to

Defaults to NULL in which case the GESIS coding will be shortened to c("widow_no_children", "partners_no_children" ...).

na_labels

Defaults to c("default").

return_class

Default is "factor" the alternative is "character".

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
rescale_marital_status (c("Widow/er: living without children",
                          "(Re-)Married: w children of this marriage",
                          "DK"),
                        return_class = "character",
                        underscore = FALSE)

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