repo_add {pak}R Documentation

Add a new CRAN-like repository

Description

Add a new repository to the list of repositories that pak uses to look for packages.

Usage

repo_add(..., .list = NULL)

repo_resolve(spec)

Arguments

...

Repository specifications, possibly named character vectors. See details below.

.list

List or character vector of repository specifications. This argument is easier to use programmatically than .... See details below.

spec

Repository specification, a possibly named character scalar.

Details

repo_add() adds new repositories. It resolves the specified repositories using repo_resolve() and then modifies the repos global option.

repo_add() only has an effect in the current R session. If you want to keep your configuration between R sessions, then set the repos option to the desired value in your user or project .Rprofile file.

Value

repo_resolve() returns a named character scalar, the URL of the repository.

Repository specifications

The format of a repository specification is a named or unnamed character scalar. If the name is missing, pak adds a name automatically. The repository named CRAN is the main CRAN repository, but otherwise names are informational.

Currently supported repository specifications:

Still works for dates starting from 2017-10-10, but now deprecated, because MRAN is discontinued:

Notes:

Exaples

repo_add(PPMdplyr100 = "PPM@dplyr-1.0.0")
repo_get()
#> # A data frame: 7 × 5                                                   
#>   name          url                         type  r_version bioc_version
#> * <chr>         <chr>                       <chr> <chr>     <chr>       
#> 1 CRAN          https://cloud.r-project.org cran  *         NA          
#> 2 PPMdplyr100   https://packagemanager.pos… cran… *         NA          
#> 3 BioCsoft      https://bioconductor.org/p… bioc  4.3.1     3.17        
#> 4 BioCann       https://bioconductor.org/p… bioc  4.3.1     3.17        
#> 5 BioCexp       https://bioconductor.org/p… bioc  4.3.1     3.17        
#> 6 BioCworkflows https://bioconductor.org/p… bioc  4.3.1     3.17        
#> 7 BioCbooks     https://bioconductor.org/p… bioc  4.3.1     3.17        
repo_resolve("PPM@2020-01-21")
#>                                       CRAN                              
#> "https://packagemanager.posit.co/cran/245"                              
repo_resolve("PPM@dplyr-1.0.0")
#>                                       CRAN                              
#> "https://packagemanager.posit.co/cran/289"                              
repo_resolve("PPM@R-4.0.0")
#>                                       CRAN                              
#> "https://packagemanager.posit.co/cran/276"                              

See Also

Other repository functions: repo_get(), repo_status()


[Package pak version 0.7.2 Index]