is_scalar <- function(object, class) {
length(object) == 1 && inherits(object, class)
}
is_string <- function(object) {
is.character(object) && length(object) == 1
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.