I\'ve created a utility R script, util.R, which I want to use from other scripts in my project. What is the proper way to ensure that the function this script defines are av
Here is one possible way. Use the exists function to check for something unique in your util.R code.
exists
util.R
For example:
if(!exists("foo", mode="function")) source("util.R")
(Edited to include mode="function", as Gavin Simpson pointed out)
mode="function"