Nothing
isString <- function(x) {
is.character(x) && length(x) == 1L && !is.na(x)
}
isInteger <- function(x) {
is.numeric(x) && length(x) == 1L && !is.na(x) && as.integer(x) == x
}
isPositiveInteger <- function(x) {
is.numeric(x) && length(x) == 1L && !is.na(x) && floor(x) == x
}
isStrictlyPositiveInteger <- function(x) {
is.numeric(x) && length(x) == 1L && !is.na(x) && floor(x) == x && x != 0
}
isFraction <- function(x) {
if(!isString(x)) {
return(FALSE)
}
x <- trimws(x)
if(grepl("^\\-*\\d+$", x)) {
return(TRUE)
}
nd <- trimws(strsplit(x, "/")[[1L]])
if(length(nd) != 2L) {
FALSE
} else {
n <- nd[1L]
if(!grepl("^\\-*\\d+$", n)) {
FALSE
} else {
d <- nd[2L]
if(!grepl("^\\d+$", d) || grepl("^0+$", d)) {
FALSE
} else {
TRUE
}
}
}
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.