Imagine I have a dataframe that looks like this
Concentration Value
Low 0.21
Medium 0.85
Low 0.10
Low 0.36
High 2.21
Medium 0.50
High 1.85
I can easily transform this into a list, where I will have:
$High
[1] -0.04 0.00 -0.10 -0.02 -0.01 -0.01
$Medium
[1] 0.01 -0.01 -0.05 0.03 0.02
$Low
[1] 0.010 0.040 -0.020 -0.007 0.010
There's a function called cohen.d() from the library(effsize) package, that allows you to calculate the effect size between two groups. You could do, for example, cohen.d(dat$Low, dat$Medium) to obtain the effect size between these two columns.
In this case, however, I would like to use a function from the apply family to compute the cohend between one factor (one of the vectors in the list) and the rest of the factors (all the other vectors in the list)
Edit:
> dput(dat2)
list(High = c(-0.04, 0, -0.1, -0.02, -0.00999999999999998, -0.00999999999999998
), Medium = c(0.01, -0.00999999999999998, -0.05, 0.03, 0.02),
Low = c(0.01, 0.04, -0.02, -0.00700000000000001, 0.01))