I come from a python background and am trying to get up to speed with R, so please bear with me
I have an R file - util.R
with the following lines:
util.add <- function(a,b) a + b
util.sub <- function(a,b) { a - b }
I source it as follows:
source('path/util.R')
I now have two function objects and want to write a function as follows:
getFilePath(util.add)
that would give me this result
[1] "path/util.R"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…