[R] setMethod

2006-09-22 Thread Sender
Hello R-help: I was hoping someone could help me understand a particular function i came across in a package: $.myClass - function( x, name ) { sym = paste( foo, name, sep = _ ) if( is.loaded(sym) ) .Call(sym,x) } I understand the paste, and .Call part, but I'm not

Re: [R] setMethod

2006-09-22 Thread Duncan Murdoch
On 9/22/2006 4:02 PM, Sender wrote: Hello R-help: I was hoping someone could help me understand a particular function i came across in a package: $.myClass - function( x, name ) { sym = paste( foo, name, sep = _ ) if( is.loaded(sym) ) .Call(sym,x) } I

[R] setMethod bug

2006-03-17 Thread Steven Lacey
Hi, I define a generic function that has many parameters (~20). I then want to define methods for the generic function with setMethod. The default behavior for setGeneric is to allow dispatching on any argument in the def function, expect ... For example, # define a generic function

Re: [R] setMethod confusion

2006-03-15 Thread Martin Maechler
Stephen == Stephen Henderson [EMAIL PROTECTED] on Tue, 14 Mar 2006 16:32:56 - writes: Stephen Hello I've checked through previous postings but Stephen don't see a fully equivalent problem-just a few Stephen hints. I have been trying to set a new method for Stephen the

Re: [R] setMethod confusion

2006-03-15 Thread Henrik Bengtsson
On 3/15/06, Martin Maechler [EMAIL PROTECTED] wrote: Stephen == Stephen Henderson [EMAIL PROTECTED] on Tue, 14 Mar 2006 16:32:56 - writes: Stephen Hello I've checked through previous postings but Stephen don't see a fully equivalent problem-just a few Stephen hints. I

Re: [R] setMethod confusion -best reference for S4 programming

2006-03-15 Thread Stephen Henderson
] On Behalf Of Henrik Bengtsson Sent: 15 March 2006 10:59 To: Martin Maechler Cc: Stephen Henderson; r-help@stat.math.ethz.ch Subject: Re: [R] setMethod confusion On 3/15/06, Martin Maechler [EMAIL PROTECTED] wrote: Stephen == Stephen Henderson [EMAIL PROTECTED] on Tue, 14 Mar 2006 16:32:56 -

Re: [R] setMethod confusion -best reference for S4 programming

2006-03-15 Thread Berton Gunter
PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Henderson Sent: Wednesday, March 15, 2006 4:28 AM To: r-help@stat.math.ethz.ch Cc: Henrik Bengtsson; Martin Maechler Subject: Re: [R] setMethod confusion -best reference for S4 programming Thanks I think you have both answered my

[R] setMethod confusion

2006-03-14 Thread Stephen Henderson
Hello I've checked through previous postings but don't see a fully equivalent problem-just a few hints. I have been trying to set a new method for the existing function table or as.data.frame.table for my class tfSites. Taking out all the useful code and just returning the input class I get

[R] setMethod confusion

2006-03-14 Thread Stephen Henderson
---sorry to repost I sent it as HTML last time--- Hello I've checked through previous postings but don't see a fully equivalent problem-just a few hints. I have been trying to set a new method for the existing function table or as.data.frame.table for my class tfSites. Taking out all the useful

[R] setMethod and contains not saving

2006-02-23 Thread Joseph Wang
Sorry if this is a duplicate I'm having the following problem saving methods which are subclasses of other objects. Is there a workaround. The problem is that the R file that triggers this bug is several meg, and I'd like to load from a RData file. This works setClass('foo') [1] foo

[R] setMethod

2004-02-17 Thread Hadley Wickham
I'm having problems understanding how setMethod works. I'm trying to create a class specfic method for xyplot, so I thought I should do something like this: setMethod(xyplot, signature(data = marrayRaw), function(formula, data, ...) { xyplot.ma(formula,

Re: [R] setMethod(min, myclass, ...)

2003-12-10 Thread Peter Ruckdeschel
Hello, first of all thank you for your reply to our help request. On Wed, 3 Dec 2003, John Chambers wrote: Thomas Stabla wrote: I have defined a new class setClass(myclass, representation(min = numeric, max = numeric)) and want to write accessor functions, so that for foo =

Re: [R] setMethod(min, myclass, ...)

2003-12-03 Thread John Chambers
Thomas Stabla wrote: Hello, I have defined a new class setClass(myclass, representation(min = numeric, max = numeric)) and want to write accessor functions, so that for foo = new(myclass, min = 0, max = 1) min(foo) # prints 0 max(foo) # prints 1 At first i created a generic

[R] setMethod(min, myclass, ...)

2003-12-02 Thread Thomas Stabla
Hello, I have defined a new class setClass(myclass, representation(min = numeric, max = numeric)) and want to write accessor functions, so that for foo = new(myclass, min = 0, max = 1) min(foo) # prints 0 max(foo) # prints 1 At first i created a generic function for min setGeneric(min,