On Nov 7, 2007, at 4:13 PM, Duncan Murdoch wrote: >> And, still no option processing as in GNU long options, or python >> or ruby's optparse. >> What's the semantics of parameter passing -- by value or by >> reference? > > By value.
Thanks Duncan! So if I have a huge table t, and the idea was to write a function t.xy(t, ...) to select slices of it, will parameter passing copying waste forfeit all aesthetic savings from refactoring? What I'm dreading is having to explicitly select x and y from t, if (<t has some shape>) { plot(t$this, t$that, ...) } else if (<t has that shape>) { plot(t$smth_else, ...) } -- that way I do refer to parts of t and there's no copying except to plot (?), yet if indeed passing parameters by value copies them, one would have to refrain from writing functions! Is that the state of things? Cheers, Alexy ______________________________________________ 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.