.is_character <-
function(x, na.ok = FALSE, zchar = FALSE)
{
is.character(x) &&
(na.ok || all(!is.na(x))) &&
(zchar || all(nzchar(x)))
}
.is_scalar_character <- function(x, na.ok = FALSE, zchar = FALSE)
length(x) == 1L && .is_character(x, na.ok, zchar)
.is_character_0_or_1 <-
function(x, na.ok = FALSE, zchar = FALSE)
{
(length(x) == 0L || length(x) == 1L) &&
.is_character(x, na.ok, zchar)
}
.is_scalar_logical <- function(x, na.ok = FALSE)
is.logical(x) && length(x) == 1L && (na.ok || !is.na(x))
.is_docker_installed <- function() {
code <- suppressWarnings(
system("docker --version", ignore.stderr = TRUE, ignore.stdout = TRUE)
)
code == 0
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.