#.onLoad <- function(libname, pkgname) {
#}
.onAttach <- function(libname, pkgname) {
packageStartupMessage("###########################################################################################")
packageStartupMessage("Loading package SpatialDFA, developed by James Thorson for the Northwest Fisheries Science Center")
packageStartupMessage("The author recommends that you instead use package VAST at https://github.com/James-Thorson/VAST")
packageStartupMessage("###########################################################################################")
if( !"INLA" %in% utils::installed.packages()[,1] ){
packageStartupMessage("Installing INLA...")
utils::install.packages("INLA", repos="https://www.math.ntnu.no/inla/R/stable")
}
#if( !"TMB" %in% utils::installed.packages()[,1] ){
# packageStartupMessage("Installing TMB...")
# devtools::install_github("kaskr/adcomp/TMB")
#}
#if( !"TMBhelper" %in% utils::installed.packages()[,1] ){
# packageStartupMessage("Installing package: TMBhelper...")
# devtools::install_github("kaskr/TMB_contrib_R/TMBhelper")
#}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.