# Author: mounicraju@gmail.com
#' Let a process kill itself
#' @name self-destruction
#' @docType package
NULL
#' @param interval number of seconds to sleep
#' @export
#' @rdname self-destruction
self-destruction <- function(interval) {
PID <- Sys.getpid()
cmd <- sprintf('(sleep %s && kill -9 %s)&', interval, PID)
system(cmd)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.