Collection of general use functions. The to-do list is noted under github.com/scc-pi/toolsheff/issues.
To use the functions, add the following at the top of your R script (or
in your setup
R Markdown or Quarto chunk):
source("https://raw.githubusercontent.com/scc-pi/toolsheff/main/R/_scc-tools.R")
If you’ve branched from main
and are developing the functions, and
want to use (or test) them, you could source from your local repo, for
example:
# source("https://raw.githubusercontent.com/scc-pi/toolsheff/main/R/_scc-tools.R")
source("C:/repo/toolsheff/R/_scc-tools.R")
You may have functions that are useful across different scripts but only
within the context of a single project. In this scenario, you could add
similar script with functions (for example _scc-tools-housing.R
), but
within your project specific repo (for example
github.com/scc-pi/housing) rather
than this repo
(github.com/scc-pi/toolsheff). In
which case you’d need to source a second file, for example:
# source("https://raw.githubusercontent.com/scc-pi/toolsheff/main/R/_scc-tools.R")
source("C:/repo/toolsheff/R/_scc-tools.R")
source(here::here("R", "_scc-tools-housing.R"))
Even with hidden authorisation credentials, we don’t want to store database addresses and port numbers in a public repo. So, this is something that will have to wait until we have secure private repos available via Azure DevOps.
Data analysis at Sheffield Council is set to switch its default Git repository hosting from GitHub to Azure DevOps. When it does, we’ll look at creating R packages for internal use via Continuous Integration. Until then this is a workaround.
We’ve briefly tried the {box}
R package to support modular code:
klmr.me/box. We may review our use of it after
we’ve established the convenience (or otherwise) of internal packages
via Continuous Integration in Azure DevOps.