Error in sum(x) : invalid 'type' (character) of argument

Hi,

I'm trying to run chi-square the frequency of four groups (Improved, negatively maintained, positively maintained and declined).


> table (Group4_subset$Mood.Change)

      Declined       Improved Neg_maintained Pos_maintained 
             3             57             35             53 

I've tried running:

> chisq.test(Group4_subset$Mood.Change, correct=FALSE)

But get this error:

Error in sum(x) : invalid 'type' (character) of argument

How can I get around this?

Many thanks in advance!
Phoenix