From beniltoncarvalho at gmail.com  Sat Jul  7 04:49:34 2012
From: beniltoncarvalho at gmail.com (Benilton Carvalho)
Date: Sat, 7 Jul 2012 03:49:34 +0100
Subject: [Rd] creating a '[' method for an S4 class
Message-ID: <CAO-arWO=1+KAo1utsOjOq8vaaTC1M7bG3yoDPGZh_x_vB5-9tw@mail.gmail.com>

Hi,

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,
benilton



[Rd] creating a '[' method for an S4 class
Benilton Carvalho