Concatenate strings to form a URL

pasteURL(..., protocol = c("https", "http", "ftp", "none"))

Arguments

...

one or more R objects, to be converted to character vectors.

protocol

character(1). Desired protocol to use. Defaults to HTTPS but HTTP and FTP are also supported. Use "none" if you want to prepare a URL that already contains a protocol in the first element of the dots.

Value

character. URL path, containing forward slashes (/).

Examples

## HTTPS x <- pasteURL( "steinbaugh.com", "basejump", "reference", protocol = "https" ) print(x)
#> [1] "https://steinbaugh.com/basejump/reference"
## FTP x <- pasteURL( "ftp.ensembl.org", "pub", "release-94", "gtf", "homo_sapiens", "Homo_sapiens.GRCh38.94.gtf.gz", protocol = "ftp" ) print(x)
#> [1] "ftp://ftp.ensembl.org/pub/release-94/gtf/homo_sapiens/Homo_sapiens.GRCh38.94.gtf.gz"