Concatenate strings to form a URL
Usage
pasteURL(..., protocol = c("none", "https", "http", "ftp", "rsync", "s3"))
Arguments
- ...
one or more R objects, to be converted to character vectors.
- protocol
character(1)
. Desired protocol to use. Defaults to "https" but "http", "ftp", and "s3" (AWS S3) are also supported. Use"none"
if you want to prepare a URL that already contains a protocol in the first element of the dots.
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"