# .onAttach <- function(libname, pkgname){
# # Catch errors
# try({
# # Suppress warnings
# suppressWarnings({
# # Get version of installed package
# pkgver <- as.character(utils::packageVersion('ppd'))
# # Look at master and devel repos on GitLab
# for(i in c('master', 'devel')) {
# # Read DESCRIPTION file
# url <- sprintf('https://f3eaipitcap01.statcan.ca/PPD/ppd/raw/%s/DESCRIPTION', i)
# desc <- readLines(url)
# # Grab unique versions as listed in DESCRIPTION
# glver <- gsub('^Version:\\s*', '', unique(desc[grep("^Version:", desc)]))
# # Proceed if there is only 1 version listed in DESCRIPTION that is above installed version
# if(length(glver) == 1L && pkgver < glver){
# packageStartupMessage(sprintf('Version %s (%s) of ppd is available on GitLab.', glver, i))
# }
# }
# })
# },
# silent = TRUE
# )
# }
#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.