Learn R Programming

creditmodel (version 1.3.1)

re_code: re_code re_code search for matches to argument pattern within each element of a character vector:

Description

re_code re_code search for matches to argument pattern within each element of a character vector:

Usage

re_code(x, codes)

Arguments

x

Variable to recode.

codes

A data.frame of original value & recode value

Examples

Run this code
# NOT RUN {
SEX  = sample(c("F","M"),1000,replace = TRUE)
codes= data.frame(ori_value = c('F','M'), code = c(0,1) )
SEX_re = re_code(SEX,codes)
# }

Run the code above in your browser using DataLab