Function to check the format of column contents
testColumnContents(data, column, code, nrcode = NA)
a data frame
column name for gender
how column values are coded
non response code corresponding to gender column
0, if success -1 if failure
# NOT RUN { testColumnContents(data.frame("sex"= c("m","f"), "Name"= c("John","Dora")),"sex",c("m","f"),999) # }
Run the code above in your browser using DataLab