make_bracketless <- function(x) structure(substitute(x), class = "bracketless")
#' @importFrom utils file.edit
NULL
#' @export
print.bracketless <- function(x, ...) eval(x, envir = parent.frame(2)) # fix for use in rstudio
#' @export
.scrap <- make_bracketless(file.edit(tempfile(fileext = ".R")))
#' @export
.rprofile <- make_bracketless(file.edit("~/.Rprofile"))
#' @export
.todo <- make_bracketless(
{
f <- Sys.getenv("TODO_FILE", "~/.todo.txt")
if (!file.exists(f)) file.create(f)
file.edit(f)
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.