This is the MARSS User Guide for the MARSS R package: https://cran.r-project.org/package=MARSS. This is part of the Applied Time Series Analysis for Environmental Science suite of software and educational material. See the GitHub repository for the MARSS source code.
To rebuild the User Guide
make will build the User Guidedoc folder into inst before running R CMD build. Note running devtools::check will delete the inst/doc folder so do the copy right before making a release or submitting to CRAN.inst/testing-releasesRun the tests in tests
[ ] Run checks without building the vignettes
devtools::check(document = FALSE, vignettes=FALSE)
devtools::run_examples(pkg="~/Documents/GitHub/MARSS", document=FALSE, fresh=TRUE)
#devtools::install_github("ropensci/spelling")
spelling::spell_check_package()
fils <- dir("vignettes/manual_files", full.names = TRUE)
fils <- fils[stringr::str_detect(fils, "Rnw")]
spelling::spell_check_files(fils, ignore = spelling::get_wordlist(pkg = "."), lang = "en_US")
setwd("~/Documents/GitHub")
devtools::build_manual(pkg="MARSS")
devtools::build() it destroys the inst/doc folder.
Note, the Mac LaTeX installation doesn't install packages on the fly. You may need to install the needed packages. From terminal: tlmgr install imakeindex, tlmgr install collection-fontsrecommended, tlmgr install footmisc, tlmgr install appendix`, plus a few more in header.tex.Open terminal
cd ~/Documents/GitHub
rm MARSS_3.11.4.tar.gz
R CMD build MARSS
rm -r ~/Dropbox/MARSS
rm ~/Dropbox/MARSS_3.11.4.tar.gz
cp MARSS_3.11.4.tar.gz ~/Dropbox/MARSS_3.11.4.tar.gz
cd ~/Dropbox
tar -xvzf MARSS_3.11.4.tar.gz
rm ~/Dropbox/MARSS/vignettes/Makefile
R CMD build --no-build-vignettes MARSS
Run version tests
[ ] Run this vignettes/versiontest.R
[ ] Run checks on the built package
rm -r ~/Dropbox/MARSS.Rcheck
R CMD check --timings --as-cran MARSS_3.11.7.tar.gz
Run internal tests
tests/model.R to set up models for tests[ ] Then run devtools::test() but I find running the tests one by one in RStudio is easier to make sense of. Some tests will through errors, but all test should pass. Errors are correct if the test passes and result should be try-error.
Check the documentation pdfs
Compress documentation pdfs
R CMD build --no-build-vignettes MARSS
rm -r ~/Dropbox/MARSS.Rcheck
R CMD check --timings --as-cran MARSS_3.11.4.tar.gz
Update the doc folder for GitHub. This has to be done manually by copying from
Prepare for release:
urlchecker::url_check()Update the doc folder on GitHub. This has to be done manually
Re-read the submission guidelines to see if anything changed: https://cran.r-project.org/submit.html
Check that package builds on Windows
Upload package to CRAN
The items below are for cases where you are submitting the package files without any extra processing. I process my vignette PDFs separately, so the below won't work. But when submitting there is a link to check the tar.gz file on Windows.
devtools::check_win_devel()rhub::check_for_cran()revdepcheck::revdep_check(num_workers = 4)Submit to CRAN:
usethis::use_version('patch')devtools::submit_cran()Wait for CRAN...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.