read_fr_tdr {fr}R Documentation

read a tabular-data-resource into R

Description

read a tabular-data-resource into R

Usage

read_fr_tdr(file)

Arguments

file

Either a path to a file, a connection, or literal data (either a single string or a raw vector). file can also be a character vector containing multiple filepaths or a list containing multiple connections.

Files ending in .gz, .bz2, .xz, or .zip will be automatically uncompressed. Files starting with ⁠http://⁠, ⁠https://⁠, ⁠ftp://⁠, or ⁠ftps://⁠ will be automatically downloaded. Remote gz files can also be automatically downloaded and decompressed.

Literal data is most useful for examples and tests. To be recognised as literal data, wrap the input with I().

Details

A file path (or url) representing a folder that contains a "tabular-data-resource.yaml" can be used in file.

Value

a fr_tdr object

Examples

read_fr_tdr(fs::path_package("fr", "hamilton_poverty_2020"))

[Package fr version 0.5.1 Index]