Skip to contents

This helper installs the stable CRAN release when available, or the GitHub development version when requested. When channel = "auto", it prefers CRAN and falls back to GitHub if no CRAN release is available.

Usage

sn_install_shennong(
  channel = c("auto", "cran", "github"),
  package = "Shennong",
  github_repo = "zerostwo/shennong",
  github_ref = "main",
  repos = getOption("repos"),
  ...
)

Arguments

channel

One of "auto", "cran", or "github".

package

Package name. Defaults to "Shennong".

github_repo

GitHub repository in "owner/repo" format.

github_ref

GitHub ref to install from. Defaults to "main".

repos

CRAN-like repositories used by install.packages().

...

Additional arguments passed to utils::install.packages() or remotes::install_github(). For GitHub installs, Shennong defaults to dependencies = FALSE and upgrade = "never" unless you override them explicitly.

Value

Invisibly returns the chosen installation channel.

Examples

if (FALSE) { # \dontrun{
sn_install_shennong(channel = "github")
} # }