The basic test of independence for a table based on the Chi-squared
distribution can be done using the `chisq.test` function. This is in
the stats package which is installed and loaded by default, so you
don't need to do anything additional. There is also the `fisher.test`
function for Fisher's exact test (similar hypotheses, different
methodology and assumptions, may be really slow on your table).
If you need more than the basics provided in those functions, then a
search of CRAN may be helpful, or give us more detail to be able to