file.name.from.url {installr} | R Documentation |
Extract the file name from some URL
Description
Gets a character of link to some file, and returns the name of the file in this link.
Usage
file.name.from.url(URL, rm.params = FALSE)
Arguments
URL |
Some url to a file. |
rm.params |
(optional, default= |
Details
The install.packages.zip must use this function, since it is crucial that the name of the file into which the ZIPPED package is downloaded to the computer, will have the same name as the file which is online.
Value
The name of the file in the URL
See Also
install.URL
, install.packages.zip
Examples
## Not run:
url <- "https://cran.r-project.org/bin/windows/base/R-2.15.3-win.exe"
file.name.from.url(url) # returns: "R-2.15.3-win.exe"
url <- "https://bioconductor.org/packages/R/genetics?version=5.01&f=gz"
file.name.from.url(url, rm.params=TRUE) # returns: "genetics?version=5.01&f=gz"
file.name.from.url(url, rm.params=FALSE) # returns: "genetics"
file.name.from.url(url) # returns: "genetics"
## End(Not run)
[Package installr version 0.23.4 Index]