Dear Arun and Rui, thank you for replying, your commands are very helpful.
Before you replied, Ive solved the issue with the following approach (for
quartiles):
myFun <- function(x, GENDER)
{
x.male <- cut(x, labels=c(1:4), breaks=quantile(split(x,GENDER) $ '1',
seq(0,1,.25), na.rm=TRUE),incl
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 me
2 matches
Mail list logo