I have the list data which contains 31 unnamed pairwise matrices. For each matrix, I would like to use cor.gather() to transform them into a three-column df. For a single matrix it'd look like:
matrix.to.df <- matrix %>%
cor_gather(drop.na=TRUE)
But in the list is tricky, as I don't have much experience with functions. I know I want something like this:
lapply(names(list), function(x) NewVar(list[[x]], "y", x))
But I don't know how to merge the two. Thank you