What's the proper way to handle a github script dependency in a CRAN package?

79 views Asked by At

There's a great R script on Github to build correlation heatmaps via ggplot2 (doesn't matter, just wanted to do the hat tip).

This script is a function, but it's not on CRAN (as such), and not even a package. (It is be part of an upstream CRAN package, but crucial bugfixes in the script don't seem to make it to the upstream repo, let alone CRAN. Without the bugfixes, it's unusable.).

This function is only used internally by my package, and never directly exposed to users.

What's the proper way to use this script in my package?

I'd like to:

  • properly recognize the script's authors work
  • have this pass CRAN (obviously)
  • be able to easily merge in upstream changes (from the script)
  • script should be sourced (or whatever) on library(mypkg), so that's ready to go and not remote-sourced via the internet anytime someone uses the function (that would be bad).

I was thinking of just copy/pasting the file, but a) recognition, and b) there has to be a better way.

0

There are 0 answers