Recode Dialog Function
DESCRIPTION:
This function is called by the Recode dialog. It is used to recode all
cases of a variable with a specified
current.value
to a new value.
USAGE:
menuRecode(data, variable, current.value, new.value,
save.name = deparse(substitute(data)),
show.p = .Options$show.data.in.view)
REQUIRED ARGUMENTS:
- data
-
Data.frame containing the variable to be recoded.
- variable
-
Character string giving the name of the column to be recoded.
- current.value
-
Value to be recoded to the specified
new.value
. If
variable
is a
factor then this will be coerced to a character string.
- new.value
-
Value to replace
current.value
. If
variable
is a factor then this will
be coerced to a character string.
- save.name
-
Name under which to save the modified data.
- show.p
-
If
TRUE
, the modified data will be displayed in a Data window.
VALUE:
Data.frame or matrix equivalent to
data
except for the specified
recoding.
EXAMPLES:
menuRecode(fuel.frame,"Type","Small","Tiny")