microbiomedata/nmdc_notebooks

Modularize R API wrapper functions

Opened this issue · 1 comments

Currently, the taxonomy and NOM R notebooks define functions for interacting with the NMDC API. The functions are essentially the same. (e.g. cell 2 here)

Rather than copy pasting the same code into every new notebook, it would be better to pull those functions out into an R package accessible by all notebooks in this repo.

Completion criteria:

  • An R package exists in this repo containing the API interaction functions we've written so far
  • The existing notebooks use functions from the package and no longer define them internally
  • It plays nicely with our renv .lock file (someone newly cloning the repo can run the notebooks after using renv::restore() )

Dealing with R packages nested in a repo is messy, so I'm going to start over with just making an R script of functions to call.