# count frequency

#### liolio

##### New Member
my dataset looks like this in the beginning:

Dosis weight sex
1 0 6.62 m
2 0 6.65 m
3 0 5.78 m
4 0 5.63 m
5 0 6.05 m
6 0 6.48 m
7 0 5.50 m
8 0 5.37 m
9 1 6.25 m

I need the frequencies of all combinations of Dosis and sex, so I tried this:

Code:
> c(Daten$Dosis=="0"[Daten$sex=="f"])
and the output doesnt make any sense.
I'm thankful for any help!

#### Dason

It's not entirely clear to me why you think your code should work at all but if you're just trying to get the frequencies then using the 'table' command should be sufficient. Your example dataset isn't too varied so the output wasn't too exciting but this do it...

Code:
# Create your example data
table(dat$Dosis, dat$sex)