is_positive_integer <- function(x) {
if (is.null(x) || is.na(x) || !is.numeric(x)) {
return(FALSE)
}
(x %% 1 == 0) && (x > 0)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.