#' Function for checking current package version.
#' (Read the version number in DESCRIPTION file.)
#' @param packageLocation The path of the package.
#'
#' @export
#'
checkPackageVersion <- function(packageLocation = "."){
# Read DESCRIPTION file --->
desc <- readLines(file.path(packageLocation, "DESCRIPTION"))
# Find the line where the version is defined
vLine <- grep("^Version\\:", desc)
# Extract version number
version_number <- gsub("^Version\\:\\s*", "", desc[vLine])
return(version_number)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.