The objective is to have two simple ways to source some code, say func.R, containing a function. Calling R CMD BATCH func.R
initializes the function and evaluates is. Within a session, issuing source("func.R")
simply initializes the function.
Any idea?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…