Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8852669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:27:33+00:00 2026-06-14T13:27:33+00:00

In the documentation, R suggests that raw data files (not Rdata nor Rda) should

  • 0

In the documentation, R suggests that raw data files (not Rdata nor Rda) should be placed in inst/extdata/

From the first paragraph in: http://cran.r-project.org/doc/manuals/R-exts.html#Data-in-packages

The data subdirectory is for data files, either to be made available
via lazy-loading or for loading using data(). (The choice is made by
the ‘LazyData’ field in the DESCRIPTION file: the default is not to do
so.) It should not be used for other data files needed by the package,
and the convention has grown up to use directory inst/extdata for such
files.

So, I have moved all of my raw data into this folder, but when I build and reload the package and then try to access the data in a function with (for example):

read.csv(file=paste(path.package("my_package"),"/inst/extdata/my_raw_data.csv",sep="")) 
# .path.package is now path.package in R 3.0+

I get the “cannot open file” error.

However, it does look like there is a folder called /extdata in the package directory with the files in it (post-build and install). What’s happening to the /inst folder?

Does everything in the /inst folder get pushed into the / of the package?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:27:34+00:00Added an answer on June 14, 2026 at 1:27 pm

    You were both very close and essentially had this. A formal reference from ‘Writing R Extensions’ is:

    1.1.3 Package subdirectories

    […]

    The contents of the inst subdirectory will be copied recursively
    to the installation directory. Subdirectories of inst should not
    interfere with those used by R (currently, R, data, demo,
    exec, libs, man, help, html and Meta, and earlier versions
    used latex, R-ex). The copying of the inst happens after src
    is built so its Makefile can create files to be installed. Prior to
    R 2.12.2, the files were installed on POSIX platforms with the permissions in the package sources, so care should be taken to ensure
    these are not too restrictive: R CMD build will make suitable
    adjustments. To exclude files from being installed, one can specify a
    list of exclude patterns in file .Rinstignore in the top-level
    source directory. These patterns should be Perl-like regular
    expressions (see the help for regexp in R for the precise details),
    one per line, to be matched(10) against the file and directory paths,
    e.g. doc/.*[.]png$ will exclude all PNG files in inst/doc based on
    the (lower-case) extension.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All the documentation I can find suggests that almost standards mode differs from standards
All the documentation suggests that ctrl+comma should bring up the navigate to dialog. When
The php documentation suggests that I should end each ob_start() with an ob_end_flush(). I
The YUI Test -Code Coverage Utility documentation suggests that we need some jar files
Using a default/vertical form, the bootstrap documentation suggests that the submit button sits underneath
Update: mogenerator works, with a template modification The Core Data documentation suggests using the
I've noticed that for indexing Arrays, the MongoDB documentation suggests that Multikeys are what
I'm trying to install dajax / dajaxice according to their documentation, which suggests that
I have been able to copy the raw data from an otherwise inaccessible USB
I'm trying svn add *.py --force As the documentation suggests , but I know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.