Say
data=structure(list(x1 = c(88L, 88L, 94L, 82L, 68L, 72L, 43L, 84L,
65L, 91L, 65L, 80L, 82L, 63L, 67L, 58L, 100L, 32L, 75L, 66L,
30L, 12L, 97L, 58L, 14L, 64L), group = structure(c(2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("female", "male"), class = "factor")), .Names = c("x1",
"group"), class = "data.frame", row.names = c(NA, -26L))
In this data there is group variable (sex (male and female) I need get statistics mean and 25 percentile for ALL male which go before female. Male which after female, i don't touch. Also female i don't touch. So as output
x1 group mean 25%
88 male 76,36 66,5
88 male 76,36 66,5
94 male 76,36 66,5
82 male 76,36 66,5
68 male 76,36 66,5
72 male 76,36 66,5
43 male 76,36 66,5
84 male 76,36 66,5
65 male 76,36 66,5
91 male 76,36 66,5
65 male 76,36 66,5
80 female
82 female
63 female
67 female
58 female
100 female
32 female
75 male
66 male
30 male
12 male
97 male
58 male
14 male
64 male
How to do it?
edit
x1 group
88 male
88 male
94 male
82 male
68 male
72 male
43 male
84 male
65 male
91 male
65 male
80 female
82 female
63 female
67 female
58 female
100 female
32 female
**76,36 male
**76,36 male
30 male
12 male
**76,36 male
58 male
14 male
64 male
here result.