\dontrun{
## Auxliary function //
.cleanTempDir <- function(x) {
if (grepl(basename(tempdir()), x)) {
unlink(x, recursive = TRUE, force = TRUE)
}
}
## Create //
path <- createPackageProject(id = "test.package", path = tempdir())
## If 'overwrite = FALSE' --> error if project already exists:
try(createPackageProject(id = "test.package", path = tempdir()))
createPackageProject(id = "test.package", path = tempdir(), overwrite = TRUE)
## Clean upp //
.cleanTempDir(x = path)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.