yread: yread

View source: R/file.R

yread_tsvR Documentation

yread

Description

read file with caching

Usage

yread_tsv(
  file,
  reader = utils::read.delim,
  params = list(),
  cache_dir = tempdir()
)

yread(file, reader = readLines, params = list(), cache_dir = NULL)

Arguments

file

a file or url

reader

a function to read the 'file_url'

params

a list of parameters that passed to the 'reader'

cache_dir

a folder to store cache files. If set to NULL will disable cache.

Details

This function read a file (local or url) and cache the content.

Value

the output of using the 'reader' to read the 'file_url' with parameters specified by the 'params'

Author(s)

Yonghe Xia and Guangchuang Yu


yulab.utils documentation built on Sept. 11, 2024, 9:25 p.m.