#' @keywords internal
string_ends_with <- function(pattern, x) {
pattern <- paste0("\\Q", pattern, "\\E$")
grep(pattern, x, perl = TRUE)
}
#' @keywords internal
.rownames_as_column <- function(x, var = "rowname") {
rn <- data.frame(rn = rownames(x), stringsAsFactors = FALSE)
x <- cbind(rn, x)
colnames(x)[1] <- var
rownames(x) <- NULL
x
}
#' @keywords internal
.obj_has_name <- function(x, name) {
name %in% names(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.