test whether input object is produced by ggtree function
is.ggtree(x)
x
object
TRUE or FALSE
guangchuang yu
library(ggtree) p <- ggtree(rtree(30)) is.ggtree(p)