| 1 |
|
| 2 |
# aliases used primarily for nicer / normalized text output |
| 3 |
the$aliases <- c( |
| 4 |
bioc = "Bioconductor", |
| 5 |
bioconductor = "Bioconductor", |
| 6 |
bitbucket = "Bitbucket", |
| 7 |
cellar = "Cellar", |
| 8 |
cran = "CRAN", |
| 9 |
git2r = "Git", |
| 10 |
github = "GitHub", |
| 11 |
gitlab = "GitLab", |
| 12 |
local = "Local", |
| 13 |
repository = "Repository", |
| 14 |
standard = "Repository", |
| 15 |
url = "URL", |
| 16 |
xgit = "Git" |
| 17 |
) |
| 18 |
|
| 19 |
alias <- function(text, aliases = the$aliases) { |
| 20 |
matches <- text %in% names(aliases) |
| 21 |
text[matches] <- aliases[text[matches]] |
| 22 |
text |
| 23 |
} |