Learn R Programming

IPDFileCheck (version 0.8.1)

test_data_numeric: Function to check the format of a numeric column

Description

Function to check the format of a numeric column

Usage

test_data_numeric(column_name, data, nrcode = NA, minval, maxval)

Value

0, if success error, if failure

Arguments

column_name

the column name

data

data frame

nrcode

non response code corresponding to the column

minval

minimum value allowed

maxval

maximum value allowed

Examples

Run this code
test_data_numeric("age", data.frame(
  "Age" =  c(21, 15),
  "Name"  = c("John", "Dora")
), -99, 0, 100)

Run the code above in your browser using DataLab