download.packages2 package:reposTools R Documentation _A _f_u_n_c_t_i_o_n _t_o _d_o_w_n_l_o_a_d _p_a_c_k_a_g_e_s _f_r_o_m _a _r_e_p_o_s_T_o_o_l_s _r_e_p_o_s_i_t_o_r_y _D_e_s_c_r_i_p_t_i_o_n: This function will download specified packages from a reposTools-style repository. Users can specify specific versions of the packages, download methods and type of packages. _U_s_a_g_e: download.packages2(pkgs, repEntry, destDir, versions, type, method = "auto") _A_r_g_u_m_e_n_t_s: pkgs: A vector of package names to download repEntry: The repository to download from destDir: The directory to store the downloaded files in. If none is provided, will use the current directory versions: An optional vector describing version numbers to be used. If provided, must be equal in length to 'pkgs' type: Type of file: e.g. 'Source' or 'Win32' method: Download method. See 'download.file' for details. _D_e_t_a_i_l_s: This function can be used to download packages from a repository. The user can specify as many packages as they would like (even none, see below) to download and the system will attempt to retrieve them all. The repository to be used is specified as the 'repEntry' parameter. The 'repositories' function is recommended for non-programatical usage to obtain a valid 'repEntry' object. The 'pkgs' parameter specifies the set of packages to try to download. If none is provided, all packges from the repository will be downloaded. The 'destDir' parameter specifies where to store the downloaded files. Not specifying this will result in the files being placed in the current directory. The 'versions' parameter is optional, and can be used to specify version numbers of the packages to download. If this is provided, it must be provided for *all* packages and thus must be of the same length as the 'pkgs' parameter. Leaving it blank will result in the highest version available of each package being downloaded. By default, the system will attempt to download the appropriate type of package for the operating system - for instance a user on Windows will get a Win32 .zip binary package. If one would like to override this, it can be done with 'type', current available values are 'Source' and 'Win32'. Lastly, the 'method' parameter can be used to specify the download method. See 'download.file' for explanations of these values. _V_a_l_u_e: A vector of the filenames downloaded _A_u_t_h_o_r(_s): Jeff Gentry _S_e_e _A_l_s_o: 'install.packages2', 'update.packages2','repositories' _E_x_a_m_p_l_e_s: tmpLib <- tempfile() dir.create(tmpLib) z <- getReposEntry("http://www.bioconductor.org/repository/sample/package") download.packages2(c("annotate", "geneplotter"), z, destDir=tmpLib) ## A more 'real world' example if (interactive()) { ## Using the repositories function will allow you to select ## a repository out of the known possibilities. The return ## value is a repEntry object which can be used for download.packages2 z <- repositories() download.packages2("Biobase", z, destDir=tmpLib) }