Timothy Goddard
10/2/2006 9:23:00 AM
You could still use the r.sum(1,2) for 99% of your method calls. The
use of square brackets rather than round ones would hardly matter for
the remaining few, which already look odd!
Alex Gutteridge wrote:
> On 1 Oct 2006, at 23:00, Kalman Noel wrote:
>
> > Alex Gutteridge:
> >> foo[x](y,z)
> >> foo[x][y,z]
> >> foo[x].call(y,z)
> >
> > Would it be a problem to write foo(x,y,z) or foo[x,y,z]?
> >
> > Kalman
>
> That is another option I had considered. However, in the library in
> question 'foo' represents a running R interpreter, 'x' represents an
> R function and 'y' and 'z' represent arguments to that function. So I
> would like to keep 'x' and 'y,z' visually separate as much as
> possible. So, while it is a little extra typing, I prefer: r
> ['sum'].call(1,2) over r('sum',1,2). In this case it would also be
> possible to write the preferred form: r.sum(1,2) but as I mentioned,
> this is not possible for some strangely named R functions such as '$'
> or '[['.
>
> Dr Alex Gutteridge
> Post-Doctoral Researcher
>
> Bioinformatics Center
> Institute for Chemical Research
> Kyoto University
> Gokasho, Uji, Kyoto 611-0011
> Japan