I have data that is in format that looks like this:
ID1 name1 R1 M1 R2 M2
ID2 name2 R1 M1 R2 M2
But in order to use friedman.test function the data should be in format like this if i understood the docs correctly:
ID1 name1 R1 M1
ID1 name1 R2 M2
ID2 name2 R1 M1
ID2 name2 R2 M2
How can I transform the data in the correct format or what is the best way to use the function in this dataset?