here is an example i created a temp folder that has all the dependencies to install the dplyr package
> getDependencies("dplyr")
[1] "assertthat" "R6" "Rcpp" "magrittr" "lazyeval" "DBI" "BH"
> library(tools)
> write_PACKAGES("C:\\R\\dplyr")
#will generate an index of all source packages found in this directory.
> install.packages("dplyr",contriburl="file:///c:/r/dplyr/")
#Note that in the example, there are 3 slashes behind the file:
prefix. The third slash indicates a path relative to the root of the file system.
Installing package into ‘C:/Users/yoni/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘assertthat’, ‘R6’, ‘Rcpp’, ‘magrittr’, ‘lazyeval’, ‘DBI’, ‘BH’
package ‘assertthat’ successfully unpacked and MD5 sums checked
package ‘R6’ successfully unpacked and MD5 sums checked
package ‘Rcpp’ successfully unpacked and MD5 sums checked
package ‘magrittr’ successfully unpacked and MD5 sums checked
package ‘lazyeval’ successfully unpacked and MD5 sums checked
package ‘DBI’ successfully unpacked and MD5 sums checked
package ‘BH’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked