rescale_time_frequency_use: Rescale time frequency of use

Description Usage Arguments Examples

Description

Create a uniform variable from use frequency categories such as code c("Everyday/Almost everyday", "Two or three times a week", "About once a week", "Two or three times a month", "Less often", "Never"). This is a wrapper function around the rescale_categories function.

Usage

1
2
3
4
5
rescale_time_frequency_use(column, from = c("Everyday/Almost everyday",
  "Two or three times a week", "About once a week",
  "Two or three times a month", "Less often", "Never"), to = c(250, 120, 50,
  25, 12, 0), exact_from = TRUE, na_labels = c("NA", "DK"),
  return_class = "numeric")

Arguments

column

A column from a survey data frame where frequency should be converted to a numeric value.

from

Defaults to c("Everyday/Almost everyday", "Two or three times a week","About once a week", "Two or three times a month", "Less often", "Never").

to

Defaults to c(250,120, 50,25,12,0).

exact_from

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

na_labels

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

return_class

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

Examples

1
2
3
rescale_time_frequency_use (column = c(
 "Everyday/Almost everyday", "Less often", "never", "NEVER", "NA", "DK"),
 na_labels = "default")

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