I think (as mentioned in comments) that a hypothesis test doesn't really answer the question you say you're interested in. (It also lacks power if any of the factors are ordered).
The thing is, 'not so much different' relates to a question about effect size (how different are they?) not a hypothesis test ("is our sample large enough to pick up even unimportant differences?").
You say you have very large sample sizes. This will cause you to reject as different distributions that are quite similar (since you'll have enough power to pick up tiny differences). Is that really what you mean to do? Or would you rather be able to say 'actually, they're fairly similarly distributed' when that's the case?
The direct answer to the question is you use
table on the pair of factors you want to test (e.g. Group and race) and then use that as input to
# make up some data
mydata <- data.frame(group=as.factor(sample(1:5,199,replace=TRUE)),
# look at the table:
(mytab <- with(mydata,table(group,race)) )
group 1 2 3
1 16 19 11
2 14 15 13
3 9 14 20
4 12 13 11
5 11 11 10
(you'll note that each group is a different size - e.g. group 1 has 46 people, group 5 has 32)
# do the chi-square
Pearson's Chi-squared test
X-squared = 6.0928, df = 8, p-value = 0.6368