Hello R-Users
   
  I am pretty new to R and forgive me if my questions are "childish" , 
nevertheless i need help. 
   
  I have some problems while trying to grasp the idea of a generic function. I 
understand that i have to build methods with naming syntax "function.class", 
where class is the CLASS of an (first) object passed to the generic function, 
and is used to decide which method shall be invoked. 
   
  Suppose i have a function say,
   
  unis <- function(x,y,...){ ..function body...}
   
  and i call the function, assigning the result to an object say,
   
  results <-unis(outcome, trial, ..) 
   
  now i want the object, results, to have a particular CLASS say "surr" so that 
i can define methods like
   
  summary.surr
  plot.surr
   
  My main trouble is: 
  what do i need to do, so that any object assigned the value from a call of 
the function unis has CLASS as "surr"
   
  Thanks
  Pryseley

                
---------------------------------


        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to