Learn R Programming

stats19 (version 4.1.0)

find_file_name: Find file names within stats19::file_names.

Description

Find file names within stats19::file_names.

Usage

find_file_name(years = NULL, type = NULL)

Arguments

years

Year, or vector of years, for which data are to be found. The special value "all" returns the single file covering the full 1979-latest series (see Details).

type

One of 'collisions', 'casualty' or 'vehicles' ignores case.

Details

The "1979-latest" file published by DfT is cumulative: it already contains every year of data up to the latest release, including recent years that also have their own individual-year files. Because of this, any request that includes a year before 2021 is satisfied entirely by that one file; individual-year files are only added when all requested years are 2021 or later, to avoid downloading and duplicating rows that are already present in the 1979-latest file.

Examples

Run this code
find_file_name(2016)
find_file_name("all")

Run the code above in your browser using DataLab