Get metadata from fread()

Open
#4,233 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
r
Domain
data

Research direction

Start by reading fread() and the verbose=TRUE behavior described in the issue, including how metadata is currently reported. Compare the proposed fglimpse() or R-object approach with the intermediate attribute-based option. Done means the selected interface returns the requested metadata—such as rows, columns, headers, colClasses, and sample values—without requiring the full fread result.

Written by the indexing model from the issue text.

Description

fread

First appeared in #3540 but moved to a separate issue.

--
It would be great if fread or a dedicated function built upon the already implemented functionality of fread could create an R object or a yaml counterpart representing the metadata of the file (or command, input) argument of fread. So instead of running fread the user could just call fglimpse and get back the number of rows, columns, column header, colClasses, sample of values etc.

As an intermediate step, it might be enough to be able to get back the metadata that fread figures out automagically as an R object (probably as an attribute of the fread result) - just as if verbose = TRUE returned the results as a list instead of printing it to stdout.

Dominant language
R
Stars
3.9k
Forks
1.1k
Avg merge
14h 4m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Rdatatable/data.table

All issues in Rdatatable/data.table

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.