Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 1.99 KB

p007-updating-midfielddata-drat-repo.md

File metadata and controls

68 lines (47 loc) · 1.99 KB

Deploying midfielddata


Drat by cranky messiah is licensed under CC BY-NC 2.0

Introduction

We use the drat package to deploy the midfielddata package as a GitHub repository instead of deploying it to CRAN because the package exceeds the CRAN size limits.

These guidelines are a quick overview of how to go about updating the midfielddata package when needed. This shouldn’t happer very often because the practice data are static.

You can read more about drat at Dirk Eddelbuettel’s Drat basics for package authors

Update the drat repo

First time only:

  • Clone a local copy of the MIDFIELDR drat repo.
  • Install the drat package.

Once the work in the midfielddata package is complete, run R CMD build to produce the midfielddata_x.x.x.tar.gz file, where x.x.x is the version number.

Update the drat repo:

  • Note the path to the local drat repo, e.g., C:/path/to/local/drat.
  • In R change your working directory to the file location of the .tar.gz file and run:
        drat::insertPackage("midfielddata_x.x.x.tar.gz", "C:/path/to/local/drat")
  • Check by navigating to the local directory drat\src\contrib. You should see the latest midfielddata_x.x.x.tar.gz file there
  • Commit and push to the GitHub repo
  • Check by installing the new version of midfielddata locally by running
       install.packages("midfielddata", repos = "https://MIDFIELDR.github.io/drat/", type = "source")
  • Run library("midfieldata") and open the data files to confirm that your changes appear.

References

1. Eddelbuettel D (2021) drat: ’Drat’ R Archive Template. https://CRAN.R-project.org/package=drat