0

New to R and programming, but working on this skill to work through very large data sets. For this exercise, I would like to perform rank correlations between two types of samples for multiple analytes (>50) at various timepoints (i.e. baseline, month 1). I can work through it manually, each analyte and timepoint one by one, but it would awesome if I could get some support to automate to compare analytes in each tissues at the various timepoint. Finally, I would like to generate a data table that lists all the correlations by rank. Any help would be much appreciated. I have included images of the data frame and some of my code below.

Here is an example of the table:

enter image description here

Here is some of my code to get correlation for one analyte (IL-8):

enter image description here

Rui Barradas
  • 70,273
  • 8
  • 34
  • 66
  • 1
    Welcome to StackOverflow. In order to ask a better question please read [How to make a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). Images are a really bad way of posting data (or code). Can you post sample data in `dput` format? Please edit **the question** with the code you've tried and with the output of `dput(df)`. Or, if it is too big with the output of `dput(head(df, 20))`. (`df` is the name of your dataset.) – Rui Barradas Mar 10 '20 at 16:05
  • Maybe you want `pairwise_cor()` from package `widyr`? – Nuclear03020704 Mar 11 '20 at 12:50

0 Answers0