Hello,

I have multiple non-normal distribution plots (the same variable from different subjects) and I am trying to get an average distribution within the cohort

I'm not sure the best way to go about this...but this is what I've been thinking of doing with the density plots I have for each subject.

A. Get the function of the curve of the distribution and then average all the functions together

B. Get the y coordinate for each x, then average at each X by the number of subjects... (x1 + x2 + x3)/3

I'm not sure if what I'm saying makes sense, but I'm very new at R - and can't even figure out how to get the function of my ggplot2 density plot

Any help will be much appreciated!