Rescale a 4-element ordinary scale variable

rescale_factor_4(
  x,
  factor_4_highest = 3,
  factor_4_high = 2,
  factor_4_low = 1,
  factor_4_lowest = 0
)

Arguments

x

A variable from the data set with four-level, ordinary scale variable.

factor_4_highest

Defaults to 3, if an natural language expression is given, it will create a character vector. (See example.)

factor_4_high

= Defaults to 2.

factor_4_low

= Defaults to 1,

factor_4_lowest

= Defaults to 0.

Value

Depending on the rescaling inputs, a numeric or character vector.

Examples

x = c("fairly easy", "very easy", "very easy", "not at all easy", "not very easy") rescale_factor_4(x, factor_4_highest = 'highest', factor_4_high = 'high', factor_4_low = 'low', factor_4_lowest = 'lowest' )
#> [1] "high" "highest" "highest" "lowest" "highest"