cacheQuery: Function for working with cached queries.

Description Usage Arguments Value

Description

This will first look in the given directory for a CSV or Rda version of the file, if it exists, that will be read and returned. Otherwise it will execute the query and then saves a CSV or Rda file.

Usage

1
2
3
cacheQuery(query = NULL, dir = getwd(), filename = getCacheFilename(query
  = query, dir = dir, ext = format, ...), format = "rda", maxLevels = 20,
  ...)

Arguments

dir

the directory to save and load cached data files. Defaults to the current working directory (i.e. getwd.

filename

the filename of the cached data file.

query

the query to execute.

maxLevels

the maximum number of levels a factor can have before being converted to a character vector.

...

other parameters passed to the execQuery function including query parameters.

format

either csv for comma separated value files or rda for R data files.

Value

a data frame.


jbryer/sqlutils documentation built on May 18, 2019, 7:03 p.m.