.class1 is an 'internal' method in the namespace of the package 'methods'. It can be accessed with the ::: operator. A good start for documentation may be Vol 3/1 of R-News.
>methods:::.class1 function (x) class(x)[[1]] <environment: namespace:methods> --Matt -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Matthew Walker Sent: Friday, August 13, 2004 17:19 PM To: [EMAIL PROTECTED] Subject: [R] Private methods Hi, I'm trying to understand R's object oriented abilities. I have read (in a very recent email to r-help) that R's methods package does not support private methods. However, I also looked at the source for the function "is": > is function (object, class2) { cl <- .class1(object) if (missing(class2)) return(extends(cl)) if (.identC(cl, class2) || .identC(class2, "ANY")) return(TRUE) ... The first line of the function, the assignment to cl, seems to call a function called ".class1". I was unable to see the source for ".class1": > .class1 Error: Object ".class1" not found It seems to me that either (a) I don't understand what I'm doing, or (b) ".class1" is a very private method. The help system finds nothing about ".class1". Could someone please help me to understand this. Most helpful of all would be pointers on where I could find more information. (So far I have found only two documents on R's object oriented abilities: "A guide to using S4 Objects" and "A draft of the R language definition".) Thanks, Matthew ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
