install allows you to install one of two collections of
nat packages
corea minimal install that can help users to get started with nat and already solve many problems (the default)natversea powerful "batteries included" distribution with all mature packages in the natverse.
Since the natverse option will install many packages from GitHub,
you need to have a GitHub account and personal access token (GITHUB_PAT).
Install will check to see if you have a GITHUB_PAT already and, if
not, walk you through the steps of setting one up. A fall-back PAT is built
into the package but we strongly recommend that you sign up to GitHub and
get your own if you start using the natverse regularly.
check_pat can be used to check if you have a GITHUB_PAT
set and will advise on how to do this if necessary.
Arguments
- collection
The collection of natverse packages that you would like to install. The current options are
core, the default, ornatverse. See Description for more information.- pkgs
A character vector of package names specifying natverse packages to install. When present overrides the
collectionargument.- dependencies
Which dependencies you want to install. The default value (
TRUE) will install all dependencies,NAwill install only hard (essential) dependencies, whileFwill not install any dependencies (not recommended). Seepak::pkg_installorinstall_githubfor further details.- upgrade.dependencies
Whether to upgrade dependencies of requested packages See the
upgradeargument ofpak::pkg_installorinstall_githubfor details. The default value (FALSE) will do the minimum amount to enable you to install the package(s) you have requested. In contrastTRUEwill go ahead and upgrade all dependencies to the latest version;pakwill potentially install source packages to do this.- method
Whether to use the
pak(now the default) orinstall_githubpackage for installation.- ...
extra arguments to pass to
pak::pkg_installorremotes::install_github.- create
Whether to help you create a personal GITHUB_PAT if you do not have one set. When
create=FALSEa default PAT will be used if you have not set your own. This could cause trouble if other people are using the same PAT.
Examples
if (FALSE) { # \dontrun{
# install core packages to try out the core natverse
if(is.interactive()) {
natmanager::install('core')
}
# Full "batteries included" installation with all packages
if(is.interactive()) {
natmanager::install('natverse')
# same but upgrading all dependencies to latest version
natmanager::install('natverse', upgrade.dependencies = T)
}
# Install natverse, non-natverse package
# for natverse packages no need to specify the repo
if(is.interactive()) {
natmanager::install(pkgs=c('nat.jrcbrains','flyconnectome/hemibrainr'))
}
} # }
if (FALSE) { # \dontrun{
# Check status of GitHub PAT and create one if required
natmanager::check_pat(create=TRUE)
# Check status of GitHub PAT and use default if no personal one available
natmanager::check_pat(create=FALSE)
} # }