fix #519, change from 'class' comparison to 'inherits'
diff --git a/R/xtable2kable.R b/R/xtable2kable.R
index 3c13658..478d6f2 100644
--- a/R/xtable2kable.R
+++ b/R/xtable2kable.R
@@ -25,7 +25,7 @@
 #'
 #' @export
 xtable2kable <- function(x, ...) {
-  if (!class(x)[1] == "xtable") {
+  if (!inherits(x, "xtable")) {
     warning("x is not an xtable object.")
     return(x)
   }