The documentation for tabyl gives an example where two options are selected from mtcars.
I've used this to see if the same chisq can be calculated without tably, but using base R only. it can
orig <- janitor::tabyl(mtcars, cyl, gear)
new <- table(subset(mtcars,select=c("cyl","gear")))
orig_chi <- janitor::chisq.test(orig)
new_chi <- stats::chisq.test(new)
orig_chi$statistic
new_chi$statistic
identical(orig_chi$statistic,
new_chi$statistic)