xguardi
November 28, 2022, 10:47am
1
Hello!
I was wondering which is the best way to implement a function that accept two types of inputs. Let's say I have the function:
foo <- function(param1, param2, param3){}
but also would like to pass those same params via config file (say a yaml file) for convenience:
foo <- function(file) {}
Thanks!
Xavi.
My approach with this functionality would be to define foo. Then define a different function, perhaps foo_from_file that reads the file and calls foo in turn.
system
Closed
December 19, 2022, 12:20pm
3
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.