-8

so im using a dataset and want to find things such as mean, trim mean, median, percentiles etc. of "fluid" produced for both boys ("sex"=1) and girls ("sex"=0) and also omit data in which fluid = na.

help pls

ysap
  • 7,723
  • 7
  • 59
  • 122
pow
  • 9
  • 2
  • 6
    Can you provide a reproducible example, that is an example data set and what code you've tried. See: http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Phil May 06 '15 at 12:19
  • possible duplicate of [How to group columns by sum in R](http://stackoverflow.com/questions/1660124/how-to-group-columns-by-sum-in-r) – zx8754 May 06 '15 at 12:24

1 Answers1

1

aggregate(fluid, by=sex, FUN=mean)

Chris Bail
  • 307
  • 1
  • 8