fetch.config: Fetch configuration file and generate a merged list

Description Usage Arguments Value Examples

View source: R/fetch.R

Description

Fetch configuration file and generate a merged list

Usage

1
2
3
4
5
6
7
fetch.config(
  links,
  return.files = FALSE,
  destdir = normalizePath("./"),
  keep.basename = TRUE,
  ...
)

Arguments

links

Url or files path that need to be merged, e.g. /tmp/config, http://, ftp://.

return.files

Only save the links configuration files to destdir and not to read and merge the configuration files, default is FALSE

destdir

Fetch configuration files and copy to this directory, default is ./

keep.basename

Whather use the links basename as the saved name or use paste0(tempfile(), '_configr')

...

Extra parameters pass to read.config

Value

A list or a vector

Examples

1
2
3
4
5
6
links <- c(paste0('https://raw.githubusercontent.com/JhuangLab', 
'/BioInstaller/master/inst/extdata/config/db/db_annovar.toml'), 
paste0('https://raw.githubusercontent.com/JhuangLab/BioInstaller', 
'/master/inst/extdata/config/db/db_main.toml'), 
system.file('extdata', 'config.toml', package = 'configr'))
x <- fetch.config(links)

configr documentation built on July 17, 2020, 5:07 p.m.