Skip to contents

Refresh the installed TimeFish snapshot. The function first uses a local repository snapshot when one is available; if not, it first tries Google Drive files matching _integrated and then the published snapshot sources (site snapshot first, then the GitHub raw mirror). Refreshed CSV files are stored in the user cache used by the package.

Usage

timefish_update(
  force = TRUE,
  source_dir = NULL,
  tables = timefish_tables(),
  overwrite = TRUE,
  from_drive = "auto",
  drive_pattern = "_integrated"
)

Arguments

force

Logical. If TRUE (default), refresh the snapshot even if a cached copy already exists. If FALSE, the function returns immediately when a cache is already present.

source_dir

Optional local path to a TimeFish repository checkout or a folder containing the approved CSV snapshot.

tables

Character vector with the tables to refresh.

overwrite

Whether to overwrite existing cached files.

from_drive

One of "auto" (default), "always", or "never". In "auto" mode the package only tries Google Drive when drive credentials are explicitly configured; otherwise it uses the public snapshot URLs without requiring any user setup. Logical values are also accepted for backwards compatibility.

drive_pattern

Pattern used to find integrated files in Google Drive. Defaults to _integrated.

Value

Invisibly, a list describing the update attempt.

Examples

if (FALSE) { # \dontrun{
timefish_update(TRUE)
} # }