Skip to content

facilitate fetching data files stored inside a package? #4

@rpruim

Description

@rpruim

From @rpruim on September 3, 2014 23:29

R packages may contain arbitrary documentation files. We have a couple csv files in the mosaic package, for example. These exist on the system, and find.package() can help to construct the path to these files, but that's too much for beginners.

We could provide a utility to construct these paths, a la:

> docFile("OneTrueLove.csv", package="Lock5withR")
[1] "/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Lock5withR/doc/OneTrueLove.csv"

We could also add a package= option to read.file() so that

read.file("OneTrueLove.csv", package="Lock5withR") 

would read the file.

Copied from original issue: ProjectMOSAIC/mosaic#380

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions