get_value_from_codes: Function to get the actual value of column content if its...

Description Usage Arguments Value Examples

View source: R/IPDFileCheck.R

Description

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

Usage

1
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

1
2
3
4
5
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)

IPDFileCheck documentation built on Feb. 1, 2022, 9:07 a.m.