x = function(df = iface(col1 = integer ~ "an integer column" ), ...) {
df = ivalidate(...)
return(df)
}
input=tibble::tibble(col1 = c(1,2,3))
x(input)
# This fails because col1 is not coercable to integer
input2=tibble::tibble(col1 = c(1.5,2,3))
try(x(input2))
Run the code above in your browser using DataLab