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

  • Home
  • SEARCH
  • 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 8977537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:23:37+00:00 2026-06-15T19:23:37+00:00

The Writing R Extensions manual states: The data subdirectory is for data files, either

  • 0

The Writing R Extensions manual states:

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.)

But it is still not clear what data is “required” by a package. I would like to use data for the following (not always mutually exclusive) reasons:

  • documentation
    • function examples
    • function tests
    • vignettes
  • to provide access to an original data set
  • to make data available to functions within the package (e.g. a lookup table / dictionary)

But it is not clear which of these should go in the data folder, and which should go in inst/extdata. And are there any conditions under which “data” should go elsewhere?

Related questions: Previous questions (e.g. inst and extdata folders in R Packaging and Using inst/extdata with vignette during package checking R 2.14.0) give some instructions on use, but don’t tell me how to decide which directory to use. Another question, R – where should I place RDA file – /R, /data, /inst/extdata?, gets the closest, but seems to focus specifically on RDA and RData files.

  • 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-15T19:23:38+00:00Added an answer on June 15, 2026 at 7:23 pm

    The data directory supplies data for the data() function and is expected to follow certain customs in terms of file formats and extensions.

    The inst/extdata directory becomes extdata/ when installed and is more of a wild west and you can do whatever you want and it is expected that you write your own accessors.

    It may be useful to look at empirics. On my machine, among around 240-some installed packages, a full 77 (or not quite a third) have data/, but only 4 (including one of mine) have extdata..

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

Sidebar

Related Questions

The Writing R Extensions manual provides the following guidance on when to use Imports
I recently started playing around with writing Perl (v5.8.8) extensions using XS. One of
I am writing some code that adds extensions to files depending on the header
From the Writing R Extensions Manual , I read that As from R 2.14.0
I've read a bit from the Writing R Extensions manual but I can't quite
When writing Python code using compiled extensions (the OpenCV Python bindings, for example), PyCharm
I am new to writing extensions for Chrome. I am trying to write a
According to this article about writing shell extensions in .Net, inheriting the shell interfaces
I am very new (started today) to writing chrome extensions but need to write
Bob Glickstein describes in Writing GNU Emacs Extensions, chapter 3, a way to advise

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.