> /I think your question should be more relevant on Rdev./
ok, I will
> Personnally I would find stuff like "names",  "$", "$<-", or "[" 
> useful as these are usual operation with S3 objects.
Is it possible in S4 to define "$<-" ? If there is a slot name 'a' in 
object 'B', I find (in "S4 in 15 pages more or less")

setGeneric("a<-", function(x, value) standardGeneric("a<-"))
setReplaceMethod("a", .....

Then we can use

obj <- new("B")
a(obj)<- 3

But I did not find how to define

obj$a <- 3

Is it possible ? Is it the 'usual' way ?


Christophe

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to