pasteURL: Concatenate strings to form a URL

Description Usage Arguments Value Note Examples

View source: R/pasteURL.R

Description

Concatenate strings to form a URL

Usage

1
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.

Value

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

Note

Updated 2021-01-21.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## HTTPS
x <- pasteURL(
    "steinbaugh.com",
    "basejump",
    "reference",
    protocol = "https"
)
print(x)

## FTP
x <- pasteURL(
    "ftp.ensembl.org",
    "pub",
    "release-94",
    "gtf",
    "homo_sapiens",
    "Homo_sapiens.GRCh38.94.gtf.gz",
    protocol = "ftp"
)
print(x)

acidgenomics/AcidBase documentation built on Sept. 10, 2021, 1:27 a.m.