Learn R Programming

installr (version 0.22.0)

file.name.from.url: 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)

Arguments

URL

Some url to a file.

Value

The name of the file in the URL

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.

See Also

install.URL, install.packages.zip

Examples

Run this code
# 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"
# }

Run the code above in your browser using DataLab