#' @title Get a sam directory from stockassessment.org
#'
#' @description The function copies the whole directory of an assessment run from
#' stockassessment.org to a local directory
#'
#' @param assessment Name of the assessment
#' @param user Name of the user
#'
get_sam_directory <- function(assessment, user = "user3") {
path <- paste("https://www.stockassessment.org/datadisk/stockassessment/userdirs",user,assessment,sep="/")
cmd <- paste0("wget --recursive --reject=png,html --level=0 --no-parent ",path,"/")
system(cmd)
# cleanup
Path <- "www.stockassessment.org/datadisk/stockassessment/userdirs"
Path <- paste(Path,user,assessment,sep="/")
cmd <- paste("mv", Path, ".")
system(cmd)
system("rm -r www.stockassessment.org")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.