Skip to content

[R-Forge #5370] Let fread accept connection inputs #341

@arunsrinivasan

Description

@arunsrinivasan

Submitted by: Richard Cotton; Assigned to: Nobody; R-Forge link

read.table in the utils package has a text argument that takes a string and converts it to a textConnection object, allowing data to be specified in the source file rather than in its own file. For example,

read.table(
text =
"x y
1 a
2 b
3 c",
header = TRUE
)

This is really useful for providing toy datasets for R-help or Stack Overflow (or wherever).

It would be great if fread supported such a feature.

read.table also allows its file argument to be a connection object. This is a less important feature, but it should be trivial to implement once the previous feature is added.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions