#' @noRd
#' @export
.generate_path <- function(path = NULL, dir, file, ext) {
if(!is.null(path)) {
return(path)
}
file.path(dir, sprintf('%s.%s', file, ext))
}
#' @noRd
#' @export
.path_x <- function(dir, file = tempfile(), ext = NULL) {
if(!is.null(ext)) {
ext <- sprintf('.%s', ext)
} else {
ext <- ''
}
file.path(dir, sprintf('%s%s', file, ext))
}
#' @noRd
#' @export
.path_data <- function(dir = get_dir_data(), ...) {
.path_x(dir = dir, ...)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.