Re: [R] Subscripting a matrix-like object

2010-05-14 Thread Jeffrey J. Hallman
jhall...@frb.gov writes: Answering my own question here, so you can ignore this unless you are really interested in some fairly obscure stuff. It turns out that this works: singleIndex <- missing(j) && (length(sys.call()) == length(match.call())) since sys.call() has an element for the empty ar

[R] Subscripting a matrix-like object

2010-05-14 Thread jhallman
I have an S3 class called "tis" (Time Indexed Series) which may or may not have multiple columns. I have a function "[<-.tis" that I've reproduced below. My question is this: inside of "[<-.tis", how can I distinguish between calls of the form x[i] <- someValue and x[i,] <- someValue ? In