| Line 13... |
Line 13... |
| 13 |
}
|
13 |
}
|
| 14 |
\usage{
|
14 |
\usage{
|
| 15 |
download.packages(pkgs, destdir, available = NULL,
|
15 |
download.packages(pkgs, destdir, available = NULL,
|
| 16 |
repos = getOption("repos"),
|
16 |
repos = getOption("repos"),
|
| 17 |
contriburl = contrib.url(repos, type),
|
17 |
contriburl = contrib.url(repos, type),
|
| 18 |
method, type = getOption("pkgType"), \dots)
|
18 |
method, type = getOption("pkgType"),
|
| - |
|
19 |
local = FALSE, \dots)
|
| 19 |
}
|
20 |
}
|
| 20 |
\arguments{
|
21 |
\arguments{
|
| 21 |
\item{pkgs}{
|
22 |
\item{pkgs}{
|
| 22 |
character vector of the names of packages whose latest available
|
23 |
character vector of the names of packages whose latest available
|
| 23 |
versions should be downloaded from the repositories.
|
24 |
versions should be downloaded from the repositories.
|
| Line 47... |
Line 48... |
| 47 |
}
|
48 |
}
|
| 48 |
\item{type}{
|
49 |
\item{type}{
|
| 49 |
character string, indicate which type of packages: see
|
50 |
character string, indicate which type of packages: see
|
| 50 |
\code{\link{install.packages}} and \sQuote{Details}.
|
51 |
\code{\link{install.packages}} and \sQuote{Details}.
|
| 51 |
}
|
52 |
}
|
| - |
|
53 |
\item{local}{
|
| - |
|
54 |
a logical indicating whether packages in local repositories should
|
| - |
|
55 |
be \dQuote{downloaded} (i.e., copied) too.
|
| - |
|
56 |
}
|
| 52 |
\item{\dots}{
|
57 |
\item{\dots}{
|
| 53 |
additional arguments to be passed to \code{\link{download.file}}
|
58 |
additional arguments to be passed to \code{\link{download.file}}
|
| 54 |
and \code{\link{available.packages}}.
|
59 |
and \code{\link{available.packages}}.
|
| 55 |
}
|
60 |
}
|
| 56 |
}
|
61 |
}
|
| 57 |
\details{
|
62 |
\details{
|
| 58 |
\code{download.packages} takes a list of package names and a
|
63 |
\code{download.packages} takes a list of package names and a
|
| 59 |
destination directory, downloads the newest versions and saves them in
|
64 |
destination directory, downloads the newest versions and saves them in
|
| 60 |
\code{destdir}. If the list of available packages is not given as
|
65 |
\code{destdir}. If the list of available packages is not given as
|
| 61 |
argument, it is obtained from repositories. If a repository is local,
|
66 |
argument, it is obtained from repositories. If a repository is local
|
| 62 |
i.e.\sspace{}the URL starts with \code{"file:"}, then the packages are not
|
67 |
i.e.\sspace{}the URL starts with \code{"file:"},
|
| - |
|
68 |
and \code{local} is \code{FALSE} then the packages are not
|
| 63 |
downloaded but used directly. Both \code{"file:"} and
|
69 |
downloaded but used directly (when installing). Both \code{"file:"} and
|
| 64 |
\code{"file:///"} are allowed as prefixes to a file path. Use the
|
70 |
\code{"file:///"} are allowed as prefixes to a file path. Use the
|
| 65 |
latter only for URLs: see \code{\link{url}} for their interpretation.
|
71 |
latter only for URLs: see \code{\link{url}} for their interpretation.
|
| 66 |
(Other forms of \samp{file://} URLs are not supported.)
|
72 |
(Other forms of \samp{file://} URLs are not supported.)
|
| 67 |
|
73 |
|
| 68 |
For \code{download.packages}, \code{type = "both"} looks at source
|
74 |
For \code{download.packages}, \code{type = "both"} looks at source
|