Entering edit mode

14 months ago

rene.j.erhardt
▴
20

I read a spreadsheet with 59 columns and 50 rows into R studio and ask for correlations. I get a tibble with r-values. All good so far. Then I picked two of the columns and ran them and I get a different r-value. Its obviously the very same sheet and numbers. Any idea why I get different results?

Established packages are unlikely to make errors in calculating a simple thing such as correlation coefficients. Chances are that something is different in how you are asking for these values to be calculated, but impossible to tell without the code and program output.

That's what I thought too and I checked again. Turns out my mistake was using the default for the lo of 50 and asking for Spearman when I did the pair. Silly thing, beginners mistake, but that's what I am.