get_value_from_codes {IPDFileCheck}R Documentation

Function to get the actual value of column content if its coded

Description

Function to get the actual value of column content if its coded

Usage

get_value_from_codes(data, column, nrcode = NA, list_codes_values)

Arguments

data

a data frame

column

column name for value

nrcode

non response code corresponding to gender column

list_codes_values

list of codes to understand the codes and value

Value

0, if success error if failure

Examples

data = data.frame("sex" = c(1, 2, 2, 1, 1),
 "Name" = c("John", "Dora","Dora", "John","John"))
list_codes_values = list(c("F", "M"),c(1,2))
ans <- get_value_from_codes(data, column = "sex", nrcode = NA,
list_codes_values)

[Package IPDFileCheck version 0.8.1 Index]