withRepos | R Documentation |
Evaluate an R expression with repositories set temporarily.
withRepos(expr, repos="[[mainstream]]", ..., substitute=TRUE, envir=parent.frame())
expr |
The R expression to be evaluated. |
repos |
A |
... |
Additional arguments passed to |
substitute |
If |
envir |
The |
Returns the results of the expression evaluated.
Henrik Bengtsson
Internally, eval
() is used to evaluate the expression.
See also options
() and install.packages
.
## Not run:
# Install from BioC related repositories only
withRepos(install.packages("edgeR"), repos="[[BioC]]")
# Install from CRAN or BioC related repositories only
withRepos(install.packages("edgeR"), repos=c("CRAN", "[[BioC]]"))
# Install from mainstream repositories only (same as previous)
withRepos(install.packages("edgeR"), repos="[[mainstream]]")
# Install from R-Forge and mainstream repositories only
withRepos(install.packages("R.utils"), repos="[[R-Forge]]")
# Update only CRAN packages
withRepos(update.packages(ask=FALSE), repos="[[CRAN]]")
# Update only Bioconductor packages
withRepos(update.packages(ask=FALSE), repos="[[BioC]]")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.