Upload with the anaconda-client
# Build your package
anaconda upload PACKAGE.tar.gz
To use a package from this index you must edit your .Rprofile
file:
# ~/.Rprofile
local({
r <- getOption("repos")
r["CRAN"] <- "https://r.anaconda.org/conda-forge"
options(repos = r, pkgType="source", download.file.method="curl", download.file.extra="-L")
})
Now you can install packages as normal:
> install.packages('xtable')
If you want to download secure private packages you can use Anaconda.org tokens:
TOKEN=$(anaconda auth --create --name r-download-token)
# ~/.Rprofile
local({
r <- getOption("repos")
r["CRAN"] <- "https://r.anaconda.org/t/$TOKEN/conda-forge"
options(repos = r, pkgType="source", download.file.method="curl", download.file.extra="-L")
})
/t/$TOKEN
with your generated token.
Upload with the anaconda-client
# Build your package
anaconda upload PACKAGE.tar.gz