absolute_path <- function(x){
if (length(x) != 1L)
stop("'x' must be a single character string")
epath <- path.expand(x)
if( file.exists(epath)){
epath <- normalizePath(epath, "/", mustWork = TRUE)
} else {
if( !dir.exists(dirname(epath)) ){
stop("directory of ", x, " does not exist.", call. = FALSE)
}
cat("", file = epath)
epath <- normalizePath(epath, "/", mustWork = TRUE)
unlink(epath)
}
epath
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.