# sample five-digit ZIPs
zips <- c("63088", "63108", "63139")
# successful validation
zi_validate(zips)
# sample five-digit ZIPs in data frame
zips <- data.frame(id = c(1:3), ZIP = c("63139", "63108", "00501"), stringsAsFactors = FALSE)
# successful validation
zi_validate(zips$ZIP)
# sample five-digit ZIPs with character
zips <- c("63088", "63108", "zip")
# failed validation
zi_validate(zips)
zi_validate(zips, verbose = TRUE)
Run the code above in your browser using DataLab