Re: [R] Change value of a slot of an S4 object within a method.

2010-08-26 Thread Joris Meys
OK, I admit. It will never win a beauty price, but I won't either so we go pretty well together. Seriously, I am aware this is about the worst way to solve such a problem. But as I said, rewriting the class definitions wasn't an option any more. I'll definitely take your advice for the next

[R] Change value of a slot of an S4 object within a method.

2010-08-25 Thread Joris Meys
Dear all, I have an S4 class with a slot extra which is a list. I want to be able to add an element called name to that list, containing the object value (which can be a vector, a dataframe or another S4 object) Obviously setMethod(add.extra,signature=c(PM10Data,character,vector),

Re: [R] Change value of a slot of an S4 object within a method.

2010-08-25 Thread Steve Lianoglou
Hi Joris, On Wed, Aug 25, 2010 at 11:56 AM, Joris Meys jorism...@gmail.com wrote: Dear all, I have an S4 class with a slot extra which is a list. I want to be able to add an element called name to that list, containing the object value (which can be a vector, a dataframe or another S4

Re: [R] Change value of a slot of an S4 object within a method.

2010-08-25 Thread Joris Meys
Hi Steve, thanks for the tip. I'll definitely take a closer look at your solution for implementation for future use. But right now I don't have the time to start rewriting my class definitions. Luckily, I found where exactly things were going wrong. After reading into the documentation about

Re: [R] Change value of a slot of an S4 object within a method.

2010-08-25 Thread Steve Lianoglou
Howdy, On Wed, Aug 25, 2010 at 1:21 PM, Joris Meys jorism...@gmail.com wrote: Hi Steve, thanks for the tip.  I'll definitely take a closer look at your solution for implementation for future use.  But right now I don't have the time to start rewriting my class definitions. Luckily, I found