I have a big data set that in its short version looks like this:
Subject RTs Block Reward Congruency
sub02 409.1 inform nonrew con
sub02 522.8 inform rew incon
sub02 512.6 noninform nonrew incon
sub02 425.5 noninform rew con
sub03 409.1 inform nonrew con
sub03 522.8 inform rew incon
sub03 512.6 noninform nonrew incon
sub03 425.5 noninform rew con
I am trying to calculate quantiles per subject using this function but checking the data afterwwards it seems that the fucntion doesn't compute the quantiles per subject:
hits <- hits %>% group_by(Subject) %>%
mutate(quan = ntile(RTs, 4)) %>%
as.data.frame()
Is there any alternative way of doing the same thing? Ot maybe something is wrong with my code?..