.welcome <- function(text = NULL)
{
if(is.null(text))
text <- "Welcome to IS!"
if(!inherits(text, "character") || length(text) != 1)
stop("'text' must be a character vector of length 1!")
vec <- strsplit(text, "")[[1]]
lab <- c(vec, "\n")
for(i in 1:length(lab)) {
setTxtProgressBar(txtProgressBar(char = lab[i]), 0.01)
Sys.sleep(0.04)
}
}
.onAttach <- function(lib, pkg)
{
vers <- read.dcf(file.path(lib, pkg, "DESCRIPTION"), "Version")
packageStartupMessage(.welcome(paste("------\nWelcome to IS! \n\nPackage IS version", vers ,"\n\nLaboratorio de Ecofisiologia e Biotecnologia Agricola - UEL")))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.