Movatterモバイル変換


[0]ホーム

URL:


Dependency resolution for R packagedevelopment

Jim Hester, Hadley Wickham, Gábor Csárdi

2024-03-17

Package remotes

Remotes, just like devtools, supports package dependency installationfor packages not yet in a standard package repository such asCRAN orBioconductor.

You can mark any regular dependency defined in theDepends,Imports,Suggests orEnhances fields as being installed from a remote locationby adding the remote location toRemotes in yourDESCRIPTION file. This will cause remotes to download andinstall them from the specified location, instead of CRAN.

The remote dependencies specified inRemotes should bedescribed in the following form.

Remotes: [type::]<Repository>, [type2::]<Repository2>

Thetype is an optional parameter. If the type ismissing the default is to install from GitHub. Additional remotedependencies should be separated by commas, just like normaldependencies elsewhere in theDESCRIPTION file.

GitHub

Because GitHub is the most commonly used unofficial packagedistribution in R, it’s the default:

Remotes: r-lib/testthat

You can also specify a specific hash, tag, or pull request (using thesame syntax asinstall_github() if you want a particularcommit. Otherwise the latest commit on the default branch is used.

Remotes: r-lib/httr@v0.4,  klutometis/roxygen#142,  r-lib/testthat@c67018fa4970

The special@*release syntax will install the latestrelease:

Remotes: r-lib/testthat@*release

A type of ‘github’ can be specified, but is not required

Remotes: github::tidyverse/ggplot2

Other sources

All of the currently supported install sources are available, see the‘See Also’ section in?install_github for a completelist.

# GitLabRemotes: gitlab::jimhester/covr# GitRemotes: git::git@bitbucket.org:djnavarro/lsr.git,  git::https://github.com/igraph/rigraph.git@main# BitbucketRemotes: bitbucket::sulab/mygene.r@default, djnavarro/lsr# BioconductorRemotes: bioc::3.3/SummarizedExperiment#117513, bioc::release/Biobase# SVNRemotes: svn::https://github.com/tidyverse/stringr# URLRemotes: url::https://github.com/tidyverse/stringr/archive/HEAD.zip# LocalRemotes: local::/pkgs/testthat

CRAN submission

When you submit your package to CRAN, all of its dependencies mustalso be available on CRAN. For this reason,devtools::release() will warn you if you try to release apackage with aRemotes field.


[8]ページ先頭

©2009-2025 Movatter.jp