Message-ID: <1354277916861-4651415.post@n4.nabble.com>
Date: 2012-11-30T12:18:36Z
From: threshold
Subject: subgroup-based quantiles
Dear R users,
given the patient sample with their Gender and Age
GENDER Age
[1,] 2 45
[2,] 1 58
[3,] 1 54
[4,] 2 71
[5,] 2 64
...
I would like to create an another column which groups the patients wrt
Gender specific Age quantiles, following methodology similar to:
Age_group <- cut(Age, labels=c(1:10), breaks=quantile(Age,
seq(0,1,.1)),include.lowest = TRUE)
The function above allows me to group only wrt Age quantiles.
Best, Robert
--
View this message in context: http://r.789695.n4.nabble.com/subgroup-based-quantiles-tp4651415.html
Sent from the R help mailing list archive at Nabble.com.