is.scalar.character <- function(x) {
is.character(x) && is.scalar(x)
}
is.scalar.numeric <- function(x) {
is.numeric(x) && is.scalar(x)
}
is.scalar.logical <- function(x) {
is.logical(x) && is.scalar(x)
}
is.scalar <- function(x) {
identical(length(x), 1L)
}
is.integerlike <- function(x) {
all(round(x) == x)
}
is.scalar.integerlike <- function(x) {
is.scalar(x) && is.integerlike(x)
}
is.null.or <- function(x, f) {
is.null(x) || f(x)
}
wait_for_user <- function() {
readline("Press enter to continue:")
TRUE
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.