1. It's your choice, but it's entirely possible to define multiple
functions in the same file or inline. If you want to read from a file
though, you have to do it with source().
2. Yes. This is the idea behind the package system.
In short, R is much nicer about functions than Matlab.
Michael
On
Hello,
I am new to the construction of user defined functions in R. I do see
the syntax of the function in many R reference but don't see the structures
/ paths issue. Two basic questions:
1. Should the function embedded in the main program? Could a function be a
separate R file (like Matlab)?
2 matches
Mail list logo