how can I get summary for only a part of my data in R?

I am very new to R, please help!
I need the summary for F and M separately, I don't know which command should I use for this purpose?

> x<-summary(cats)
Sex Bwt Hwt
F:47 Min. :2.000 Min. : 6.30
M:97 1st Qu.:2.300 1st Qu.: 8.95
Median :2.700 Median :10.10
Mean :2.724 Mean :10.63
3rd Qu.:3.025 3rd Qu.:12.12
Max. :3.900 Max. :20.50