Learn R Programming

wrMisc (version 2.1.0)

gitDataUrl: Convert GitHub Url-Name For Reading In Raw-Mode

Description

This functions converts a given urlName so that (tabular) data from GitHub (https://github.com/) can data be read correctly as tabular data.

Usage

gitDataUrl(
  urlName,
  replTxt = NULL,
  silent = FALSE,
  debug = FALSE,
  callFrom = NULL
)

Value

corrected urlName

Arguments

urlName

(charachter) main url-address

replTxt

(NULL or matrix) adjust/ custom-modify search- and replacement items; default settings will exchange the beginning of the site to 'raw.githubusercontent.com' and then exchange 'blob' to 'refs/head' otherwise should be matrix with 2 columns, the 1st colimn entries will be used as 'search-for' and the 2nd as 'replace by' for each row

silent

(logical) suppress messages

debug

(logical) additional messages for debugging

callFrom

(character) allow easier tracking of messages produced

Details

Thus, this will exchange the beginning of the site to 'raw.githubusercontent.com' and then exchange 'blob' to 'refs/head' . Alternatively, the user may custom define all terms to get exchanged (as matrix with 2 columns 'old' and 'new').

Note : The default spearator from read.delim may suit better for reading the data.

See Also

Examples

Run this code
url1 <- paste0("https://github.com/bigbio/proteomics-metadata-standard/blob/",
  "main/datasets/PXD001819/PXD001819.sdrf.tsv") 
rbind(ini=url1, new=gitDataUrl(url1))

Run the code above in your browser using DataLab