locate_one_file: Pin down a file on disk from four parameters.

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Pin down a file on disk from four parameters.

Usage

1
2
locate_one_file(filename = NULL, data_dir = tempdir(), year = NULL,
  type = NULL)

Arguments

filename

Character string of the filename of the .csv to read, if this is given, type and years determine whether there is a target to read, otherwise disk scan would be needed.

data_dir

Where sets of downloaded data would be found.

year

Single year for which file is to be found.

type

One of: 'Accidents', 'Casualties', 'Vehicles'; ignores case.

Value

One of: path for one file, a message More than one file found or error if none found.

Examples

1
2
locate_one_file()
locate_one_file(filename = "Cas.csv")

ITSLeeds/stats19 documentation built on May 4, 2019, 7:35 a.m.