prt

Tabular Data Backed by Partitioned `fst` Files

https://github.com/nbenn/prt

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (20.1%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Tabular Data Backed by Partitioned `fst` Files

Basic Info
Statistics
  • Stars: 6
  • Watchers: 2
  • Forks: 1
  • Open Issues: 2
  • Releases: 0
Created over 6 years ago · Last pushed over 3 years ago
Metadata Files
Readme Changelog License

README.Rmd

---
output:
  github_document:
    html_preview: false
---



```{r setup, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
library(prt)
```

# prt


[![Lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![Codecov test coverage](https://app.codecov.io/gh/nbenn/prt/branch/master/graph/badge.svg?token=HvOM3yosW3)](https://app.codecov.io/gh/nbenn/prt)
[![R build status](https://github.com/nbenn/prt/workflows/build/badge.svg)](https://github.com/nbenn/prt/actions?query=workflow%3Abuild)
[![pkgdown build status](https://github.com/nbenn/prt/workflows/pkgdown/badge.svg)](https://github.com/nbenn/prt/actions?query=workflow%3Apkgdown)
[![covr status](https://github.com/nbenn/prt/workflows/coverage/badge.svg)](https://github.com/nbenn/prt/actions?query=workflow%3Acoverage)


Building on `data.frame` serialization provided by [`fst`](https://www.fstpackage.org), `prt` offers an interface for working with partitioned `data.frame`s, saved as individual `fst` files.

## Installation

You can install the development version of [prt](https://nbenn.github.io/prt/) from GitHub by running

```{r gh-dev, eval = FALSE}
source("https://install-github.me/nbenn/prt")
```

Alternatively, if you have the `remotes` package available, the latest release is available by calling `install_github()` as

```{r gh-rel, eval = FALSE}
# install.packages("remotes")
remotes::install_github("nbenn/prt@*release")
```

## Short demo

Creating a `prt` object can be done either by calling `new_prt()` on a list of previously created `fst` files or by coercing a `data.frame` object to `prt` using `as_prt()`.

```{r create}
tmp <- tempfile()
dir.create(tmp)

flights <- as_prt(nycflights13::flights, n_chunks = 2L, dir = tmp)

print(flights)
```

In case a `prt` object is created from a `data.frame`, the specified number of files is written to the directory of choice (a newly created directory within `tempdir()` by default).

```{r inspect}
list.files(tmp)
```

Subsetting and printing is closely modeled after `tibble` and behavior that deviates from that of `tibble` will most likely be considered a bug (please [report](https://github.com/nbenn/prt/issues/new)). Some design choices that do set a `prt` object apart from a `tibble` include the use of `data.table`s for any result of a subsetting operation and the complete disregard for `row.names`.

In addition to standard subsetting operations involving the functions `[`(), `[[`() and `$`(), the base generic function `subset()` is implemented for the `prt` class, enabling subsetting operations using non-standard evaluation. Combined with random access to tables stored as `fst` files, this can make data access more efficient in cases where only a subset of the data is of interest.

```{r subset}
jan <- flights[flights$month == 1, ]
identical(jan, subset(flights, month == 1))
print(jan)
```

A subsetting operation on a `prt` object yields a `data.table`. If the full table is of interest, a `prt`-specific implementation of the `as.data.table()` generic is available.

```{r cleanup}
unlink(tmp, recursive = TRUE)
```

Owner

  • Name: nbenn
  • Login: nbenn
  • Kind: user
  • Location: Zürich
  • Company: @cynkra

GitHub Events

Total
  • Create event: 1
Last Year
  • Create event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 87
  • Total Committers: 2
  • Avg Commits per committer: 43.5
  • Development Distribution Score (DDS): 0.011
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Nicolas Bennett n****t@s****h 86
Kirill Müller k****r@m****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 7
  • Total pull requests: 1
  • Average time to close issues: 4 months
  • Average time to close pull requests: 1 day
  • Total issue authors: 5
  • Total pull request authors: 1
  • Average comments per issue: 1.14
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • nbenn (2)
  • krlmlr (2)
  • barracuda156 (1)
  • mattdowle (1)
  • DarwinAwardWinner (1)
Pull Request Authors
  • krlmlr (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 455 last-month
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 9
  • Total maintainers: 1
cran.r-project.org: prt

Tabular Data Backed by Partitioned 'fst' Files

  • Versions: 8
  • Dependent Packages: 1
  • Dependent Repositories: 2
  • Downloads: 455 Last month
Rankings
Dependent packages count: 18.2%
Dependent repos count: 19.2%
Stargazers count: 20.6%
Forks count: 21.0%
Average: 21.0%
Downloads: 26.2%
Maintainers (1)
Last synced: 11 months ago
conda-forge.org: r-prt

Intended for larger-than-memory tabular data, 'prt' objects provide an interface to read row and/or column subsets into memory as data.table objects. Data queries, constructed as 'R' expressions, are evaluated using the non-standard evaluation framework provided by 'rlang' and file-backing is powered by the fast and efficient 'fst' package.

  • Versions: 1
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent packages count: 28.8%
Dependent repos count: 34.0%
Average: 43.7%
Stargazers count: 54.5%
Forks count: 57.4%
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • assertthat * imports
  • backports * imports
  • cli * imports
  • crayon * imports
  • data.table * imports
  • fansi * imports
  • fst * imports
  • pillar * imports
  • rlang * imports
  • tibble * imports
  • utils * imports
  • vctrs * imports
  • bench * suggests
  • covr * suggests
  • datasets * suggests
  • knitr * suggests
  • nycflights13 * suggests
  • rmarkdown * suggests
  • testthat * suggests
  • withr * suggests
  • xml2 * suggests
.github/workflows/build.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/coverage.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action 4.1.4 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite