Here is a minimum working example.
> d <- data.frame(x = sample(LETTERS[1:4], 100, TRUE))
> a <- mytable(~x, data = d)
> mylatex(a)
mylatex function only applicable to data.frame, mytable or cbind.mytable
> class(a)
[1] "mytable.df" "data.frame"
moonBook 0.3.1 is used here.