IPDFileCheck (version 0.5.0)

testDataStringRestriction: Function to check the format of a string column when the string values are given

Description

Function to check the format of a string column when the string values are given

Usage

testDataStringRestriction(data, column.name, nrcode = NA,
  allowed.strings)

Arguments

data

data frame

column.name

the column name

nrcode

non response code corresponding to the column

allowed.strings

allowed strings or characters to represent meaningful entry

Value

0, if success -1, if failure

Examples

Run this code
# NOT RUN {
testDataStringRestriction(data.frame("Age" = c(21,15), "sex" = c("m","f")),"sex",-999,c("f","m"))
# }

Run the code above in your browser using DataLab