@@ -25,7 +25,7 @@ eval(expression({
2525
2626 fastrRepoPath <- NULL
2727
28- install.fastr.packages <- function (pkgs ) {
28+ install.fastr.packages <- function (pkgs , lib , INSTALL_opts = character ( 0 ) ) {
2929 if (is.null(fastrRepoPath ) || ! file.exists(fastrRepoPath )) {
3030 workDir <- tempdir()
3131 download.file(' https://api.github.com/repos/oracle/fastr/tarball/master' , file.path(workDir , ' fastr-repo.tar.gz' ))
@@ -37,7 +37,11 @@ eval(expression({
3737 for (pkg in pkgs ) {
3838 pkgPath <- file.path(fastrRepoPath , ' com.oracle.truffle.r.pkgs' , pkg )
3939 if (file.exists(pkgPath )) {
40- install.packages(pkgPath , repos = NULL )
40+ if (missing(lib )) {
41+ install.packages(pkgPath , repos = NULL , INSTALL_opts = INSTALL_opts )
42+ } else {
43+ install.packages(pkgPath , lib = lib , repos = NULL , INSTALL_opts = INSTALL_opts )
44+ }
4145 } else {
4246 stop(paste0(" FastR doesn't provide patched version of package " , pkg , " . Use install.packages to install it." ));
4347 }
@@ -92,4 +96,4 @@ eval(expression({
9296
9397# export new public functions
9498exports <- asNamespace(" utils" )[[" .__NAMESPACE__." ]][[' exports' ]]
95- assign(' install.fastr.packages' , ' install.fastr.packages' , envir = exports )
99+ assign(' install.fastr.packages' , ' install.fastr.packages' , envir = exports )
0 commit comments