Entering edit mode
10.6 years ago
biotechdiya
▴
30
Hi,
I am trying to write a r code to calculate the pearson correlation for the first row vs the rest of the rows. (1vs2, 1vs3,1vs4,1vs5 so on). I am not sure if apply,lapply or sapply will work for this. Also when I try to loop it says x and y must be of same length, but here always my x is going to row 1 and y is 2:19725.
How can make it workable in R
Thanks,
Thank you Gian. It worked..