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