test_data_string_restriction: Function to check the format of a string column when the...

View source: R/IPDFilecheck.R

test_data_string_restrictionR Documentation

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

test_data_string_restriction(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 error, if failure

Examples

test_data_string_restriction(
  data.frame("Age" = c(21, 15), "sex" = c("m", "f")),
  "sex", -999, c("f", "m")
)

sheejamk/IPDFileCheck documentation built on March 10, 2024, 3:14 p.m.