Package 'feather'

Title: R Bindings to the Feather 'API'
Description: Read and write feather files, a lightweight binary columnar data store designed for maximum speed.
Authors: Hadley Wickham [aut, cre], RStudio [cph], LevelDB Authors [ctb]
Maintainer: Hadley Wickham <[email protected]>
License: Apache License 2.0
Version: 0.3.5.9000
Built: 2024-09-29 05:04:10 UTC
Source: https://github.com/wesm/feather

Help Index


Access a feather store like a data frame

Description

These functions permit using a feather dataset much like a regular (read-only) data frame without reading everything into R.

Usage

feather(path)

feather_metadata(path)

Arguments

path

Path to feather file

Details

They work by using arrow::read_feather() to read the data in as an Arrow Table, an efficient data structure that supports many data-frame methods. See the Arrow package documentation for more information.

Value

An arrow::Table


Read and write feather files.

Description

Read and write feather files.

Usage

read_feather(path, columns = NULL, ...)

write_feather(x, path, version = 1, ...)

Arguments

path

Path to feather file

columns

Columns to read (names or indexes), or a tidy selection specification of columns, as used in dplyr::select(). Default: Read all columns.

...

Additional arguments passed to the ⁠arrow::⁠ functions

x

A data frame to write to disk

version

integer in c(1, 2) indicating the Feather format version to write. For compatibility, the default for feather::write_feather() is 1.

Value

Both functions return a tibble/data frame. write_feather invisibly returns x (so you can use this function in a pipeline).

Examples

mtcars2 <- read_feather(feather_example("mtcars.feather"))
mtcars2