Abstract

Data-only packages offer a way to provide extended functionality for other R users. However, such packages can be large enough to exceed the package size limit (5 megabytes) for the Comprehensive R Archive Network (CRAN). As an alternative, large data packages can be posted to additional repostiories beyond CRAN itself in a way that allows smaller code packages on CRAN to access and use the data. The drat package facilitates creation and use of such alternative repositories and makes it particularly simple to host them via GitHub. CRAN packages can draw on packages posted to drat repositories through the use of the 'Additonal_repositories' field in the DESCRIPTION file. This paper describes how R users can create a suite of coordinated packages, in which larger data packages are hosted in an alternative repository created with drat, while a smaller code package that interacts with this data is created that can be submitted to CRAN.

Highlights

  • Data-only packages offer a way to provide extended functionality for other R users

  • This approach is a good one for data that is already available through an online database, especially if the database is outside the control of the R package maintainer or if the potential set of data is extremely large and it is unlikely that an R user would want to download all of it, since an application program interfaces (APIs) allows an R user to selectively download parts of the data

  • Two additions are needed and a third is suggested in the DESCRIPTION file (Figure 2) of the code package that will be submitted to Comprehensive R Archive Network (CRAN): 1. We suggest the ‘Description’ field of the code package’s ‘DESCRIPTION’ file be modified to let users know how to install the data package and how large it is (this tip is inspired by the grattan package; Parsonage et al (2017))

Read more

Summary

Introduction

Data-only packages offer a way to provide extended functionality for other R users. such packages can be large enough to exceed the package size limit (5 megabytes) for the Comprehensive R Archive Network (CRAN). If a package maintainer would like to coordinate a code package that will be submitted to CRAN with a data package posted in a drat repository, it is necessary to add some infrastructure to the code package (in our example, hurricaneexposure, which has functions for exploring and mapping the data in hurricaneexposuredata).

Results
Conclusion

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.