count frequency

#1
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

Ambassador to the humans
#2
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
dat <- read.table(textConnection("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"))

# Table the results...
table(dat$Dosis, dat$sex)