Learn R Programming

fr

fr provides fr_tdr, fr_schema, and fr_field objects for implementing frictionless tabular-data-resource standards in R.

Installation

Install {fr} from CRAN:

install.packages("fr")

You can install the development version of {fr} from GitHub with:

# install.packages("pak")
pak::pak("cole-brokamp/fr")

Usage

  • See vignette("read_fr_tdr") to read a Frictionless Tabular Data Resource from disk or the web, access metadata, and manipulate it as a data.frame
  • See vignette("creating_a_tabular-data-resource") to create a Frictionless Tabular Data Resource by converting a data.frame or tibble, adding metadata, and writing to disk

Frictionless Standards

Developed by the Open Knowledge Foundation, the frictionless standards are a set of patterns for describing data, including datasets (Data Package), files (Data Resource), and tables (Table Schema). A Data Package is a simple container format used to describe and package a collection of data and metadata, including schemas. These metadata are contained in a specific file (separate from the data file), usually written in JSON or YAML, that describes something specific to each Frictionless Standard:

  • Table Schema: describes a tabular file by providing its dimension, field data types, relations, and constraints
  • Data Resource: describes an exact tabular file providing a path to the file and details like title, description, and others
  • Tabular Data Resource = Data Resource + Table Schema
  • CSV dialect: describes the formatting specific to the various dialects of CSV files
  • Data Package & Tabular Data Package: describes a collection of tabular files providing data resource information from above along with general information about the package itself, a license, authors, and other metadata

Copy Link

Version

Install

install.packages('fr')

Monthly Downloads

496

Version

0.5.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Cole Brokamp

Last Published

November 30th, 2023

Functions in fr (0.5.1)

fr-package

About the fr package
dplyr_methods

dplyr methods for fr_tdr objects
as_data_frame

Coerce a fr_tdr object into a data frame
is_fr_field

Test if an object is a fr_field object
read_fr_tdr

read a tabular-data-resource into R
as_list

Coerce a fr_tdr object into a list
as_fr_field

Coerce character, factor, numeric, logical, and Date vectors into fr_field objects
as_fr_tdr

Coerce a data frame into a fr_tdr object
update_field

add or update field-specific metadata in a fr_tdr object
write_fr_tdr

write a fr_tdr object to disk