I am running a Rayleigh Test of Uniformity in R. I have my data frame subsetted to 3 columns with slightly differing degrees. When it then run tests selecting one of the columns, my results vary depending on how I have selected the column to use in the test: [c"Direction"] or df$Direction.
My df:
Direction Dir180 CorrDirection    Sex Location
1       146    146           128 Female      Low
2       129    129           111   Male      Low
3       337    157           319 Female      Low
4       130    130           112 Female      Low
5       216     36           198 Female      Low
6       351    171           333   Male      Low
Test:
r.test(x=df2[c("Direction")],degree=T)
r.test(x=df2$Direction,degree=T)
Test results:
> r.test(x=df2[c("Direction")],degree=T)
$r.bar
[1] 3.265616
$p.value
[1] 0.002646553
> r.test(x=df2$Direction,degree=T)
$r.bar
[1] 0.03887638
$p.value
[1] 0.880773
I would like to know why I am getting different results when to me it looks like I am selecting the same column for the tests. What is the difference between using the two different methods and how does the test or program respond to each? Thanks
 
    