.pipes <- c("%>%")
#' @importFrom rlang %||%
NULL
is_pipe <- function(x) {
if (is.character(x)) x <- parse(text = x)[[1]]
ifelse(is.call(x), as.character(x[[1]]) %in% .pipes, FALSE)
}
.infixes <- c("+", "-", "*", "/", "^", "%%", "%/%", "%in%")
is_infix <- function(x) {
if (is.character(x)) x <- parse(text = x)[[1]]
ifelse(is.call(x), as.character(x[[1]]) %in% .infixes, FALSE)
}
deparse_to_string <- function(x, width.cutoff = 500L, ...) {
paste0(deparse(x, width.cutoff = width.cutoff, ...), collapse = "\n")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.