refresh: Refresh data

Description Usage Arguments Value Examples

Description

Refresh all applicable data files.

Usage

1
2
refresh(daily = TRUE, overwrite = FALSE, data.dir = "data",
  sql.dir = "sql", subs.dir = "subs")

Arguments

daily

Boolean to indicate whether to force a rerun of the query on first execution each day.

overwrite

Boolean to indicate whether to force a rerun of the query.

data.dir

Query results directory. Stores the results of the SQL queries as RDS files.

sql.dir

SQL query directory. Stores all the SQL used. If subs were provided, it saves the query before the subs were inserted.

subs.dir

Subs directory. Stores all the individual subs for each query as a data frame.

sql

SQL query to run

name

name of query

subs

One row data frame whose column names are the substrings to replace, and whose values are the strings to replace them with.

Value

Data frame of the query results

Examples

1
2
3
4
5
# Run a daily refresh
refresh()

# Force a refresh
refresh(overwrite = TRUE)

ndesmo/rquery documentation built on May 7, 2019, 9:43 p.m.