We all know functions like is.data.frame
or is.double
etc. Probably easy to do but hard to google: How can create your own is.? function? Is there a better way to do it then:
is.myClass <- function(x){
if(class(x) %in% "myClass") return(TRUE)
else return(FALSE)
}