У меня есть большой объем данных, которые я хотел бы разделить на несколько переменных, как показано на следующем графике:
There are a total of 63 plots here, divided by 3 variables (rows
, cols
and fram
). In reality, of course, valuex
and valuey
have more than 3 observations. I would like to find the Pearson correlation for every single one of these as efficiently as possible and I'm kinda blanking on ideas.
Here's some example data with which the plot was created:
example_df <- data.frame(rows = rep(c('r1', 'r2', 'r3'), 63),
cols = rep(letters[1:7], 27),
fram = rep(c('X', 'Y', 'Z'), each = 63),
valuex = rnorm(189),
valuey = rnorm(189))