knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(datelife)
And other tips that I used to get datelife
on CRAN
https://www.r-bloggers.com/2020/12/top-10-tips-to-make-your-r-package-even-more-awesome/
I was having trouble declaring Bioconductor packages.
Most people suggested that adding "BiocViews:" to the Description file would solve the issue. But it did not, and I kept on finding unanswered posts about packages being rejected fromx CRAN because of dependencies from Bioconductor using the "biocviews" trick. So I did a reverse dependencie search on Bioconductor packages. Surely at least one package in CRAN must have a dependency from Bioconductor. Indeed, the msa package has bio3d as a reverse dependency:
devtools::revdep("msa") #> [1] "bio3d"
Going into the CRAN mirror of the bio3d package on GitHib, I found their solution:
if (!requireNamespace("msa", quietly=TRUE)) { stop("msa package missing: Please install it from Bioconductor, see: ?BiocManager::install") }
Calling Bioconductor packages conditionally allows us to move them into "Suggests" on the DESCRIPTION file. I found out you also have to add them to "Remotes":
Suggests: msa, Biostrings Remotes: bioc::release/msa, bioc::release/Biostrings
The Remotes part had to be removed for CRAN submission. Because some of my tests depend on these packages being installed, I added helper file with a call to package installation of msa and Biostrings if they are not already installed.
Note checking CRAN incoming feasibility Maintainer:
It is safe to ignore this note: https://stackoverflow.com/questions/23829978/checking-cran-incoming-feasibility-note-maintainer
Automated R CMD checks with GitHub actions:
remotes::install_github("aaronpeikert/repro") repro::check_git() repro::check_github_ssh() usethis::create_github_token() gitcreds_set() Choose option 2) Replace credentials. It will prompt your for the new token, and you will be all set. usethis::use_github_actions()
Building package website
pkgdown::build_site() pkgdown::build_home_index(); pkgdown::init_site()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.