[Rd] creating a '[' method for an S4 class
beniltoncarvalho at gmail.com
Sat Jul 7 04:49:34 CEST 2012
I'm working on an S4 class that is expected to behave like an array.
I have some difficulties when defining '[' and I wonder if someone
could point me to the right direction:
1) Call the S4 object "obj"
2) Assume dim(obj) = c(10, 4, 2)
3) Suppose someone calls: obj[1:3,] , which is a mistake, given
dim(obj); how do I detect such situations?
Thank you very much for your attention and time,
More information about the R-devel