I am porting some MATLAB functions over to R and hopefully into a package, so I am curious if nargin and nargout work with R functions.
Here is kind of an example of where I need to head in order to port "control-1.0.11" from Octave over to R. The Octave "control-1.0.11" package has the capability to produce bode plots of transfer functions. I hope to post this package once the port over to R is complete. Thanks again for all the feedback and insights. bode<-function(sys, w, outputs, inputs, plot_style) { # ... if (nargin < 1 || nargin > 5) { print("This works") } if (nargout < 1) { print("This also works") } return(list(mag_r, phase_r, w_r)) } ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.