Re: [Bioc-devel] Overloading subset operator for an S4 object with more than two dimensions

2015-05-18 Thread Martin Morgan
On 05/18/2015 06:06 AM, Christian Arnold wrote: Thanks for your input, highly appreciated! I can see that the semantics of "[" are violated, so I agree that overwriting the "subset" method is probably a better way to go. Essentially, the object stores several, individual-specific count matrice

Re: [Bioc-devel] Overloading subset operator for an S4 object with more than two dimensions

2015-05-18 Thread Christian Arnold
Thanks for your input, highly appreciated! I can see that the semantics of "[" are violated, so I agree that overwriting the "subset" method is probably a better way to go. Essentially, the object stores several, individual-specific count matrices from RNA-Seq experiments in an potentially al

Re: [Bioc-devel] Overloading subset operator for an S4 object with more than two dimensions

2015-05-14 Thread Michael Lawrence
I agree with Wolfgang that the semantics of [ are being violated here. It would though help if you could be a little less vague about your intent. What is this data structure going to store, how should it behave? On Thu, May 14, 2015 at 3:35 AM, Christian Arnold wrote: > Hi there, > > I am about

Re: [Bioc-devel] Overloading subset operator for an S4 object with more than two dimensions

2015-05-14 Thread Wolfgang Huber
Dear Christian not sure this is a wise idea, it breaks the semantics of “[“. The number of elements stored in an array is the product of the extent of its dimensions. In your example, it is the sum. To put it less abstract, a[1:2, 2, 3:4, 1] for a regular array is a 2 x 2 matrix, whereas in your

[Bioc-devel] Overloading subset operator for an S4 object with more than two dimensions

2015-05-14 Thread Christian Arnold
Hi there, I am about to develop a Bioconductor package that implements a custom S4 object, and I am currently thinking about a few issues, including the following: Say we have an S4 object that stores a lot of information in different slots. Assume that it does make sense to extract informat