url2path: Make a File Path from a URL

View source: R/url2path.R

url2pathR Documentation

Make a File Path from a URL

Description

Combine the basename() of a file URL with a directory path.

Usage

url2path(url, dir)

Arguments

url

The URL of a file to download.

dir

The directory where the file will be downloaded.

Details

Useful in the destfile argument to download.file() to save a file with the same name as the URL's file name.

Value

The desired file path to a URL file.

Examples

url2path("https://floridalobbyist.gov/reports/llob.txt", tempdir())

campfin documentation built on Oct. 20, 2023, 5:06 p.m.