R - Execute a function in a file -
there r file , there function getinfo() in it. want run function in script file alone. possible ? know running script command on file , running function name help. run rest of stuffs script file dont want. best way out here
when utilize source
on script file, code in file loaded r session active. code not in function, executed. see 2 options:
option
, retrieve value in file sourced using getoption
, making execution of non-function code dependend on option. require set alternative before sourcing file, in project utilize in. i go alternative 1.
r
No comments:
Post a Comment