Dear R-Users and R-Devels, I have large project based on S4 classes. While writing my unit tests I found out, that 'is' cannot test for a specific class, as also inherited classes can be treated as their super classes. I need to do checks for specific classes. What I do right now is sth. like
if (class(myClass) == "firstClass") { } else if (class(myClass) == "secondClass") { } Is this the usual way how classes are checked in R? I was expecting some specific method (and 'inherits' or 'extends' is not what I look for)... Best Simon [[alternative HTML version deleted]] ______________________________________________ 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.