I tried finding the answer from other questions but either because other questions were highly specific or worded in a confusing manner I was unable to find the exact information applicable to my situation. Here goes:
I have, say, two variables, and 100 observations of each:
V1 <- rnorm(100, 0, 1)
V2 <- rpois(100, 4)
data <- cbind(V1, V2)
I want to group the participants based on what quantile they fall into on one variable, say V1, and then compute a mean and standard deviation of V2 for each quantile group.
Key note: I want to create the groups based on how many standard deviations they are from the mean of V1. So my quantile groups should be roughly: bottom 2%, 2nd p-tile to 16th, 16th to 50th, 50th to 84th, 84th to 98th, and top 2%.