Thanks, so I tried this but there were a couple of problems, but I think I found a solution. I put the data in a table using table(). When I run fisher.test() I get an error FEXACT error 6. LDKEY=617 is too small for this problem.... Something to do with memory. I subsetted the table and the maximum matrix it works with is 2x3 (or 3x2). I did find on another forum however that chisq.test(<table>, simulate.p.value = T) is 'equivalent' to Fisher's exact test.
However, then I found that fisher.test() also has this argument. Indeed, they produce similar results. I'm not sure however what this parameter means!
Thanks