is_intlike <- function(x) {
if (!is.numeric(x)) {
return(FALSE)
}
x_nona <- x[!is.na(x)]
if (length(x_nona) == 0) {
TRUE
} else {
isTRUE(all.equal(rep(0, length(x_nona)), x_nona %% 1))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.