I'm trying to test for correlation between x
and y
of my data using Spearman Rank-Order Correlation in R but encountered the following error:
Error in cor.test.default(x = Female_ChLO, y = Female_TBL, method = "spearman") :
'x' and 'y' must have the same length
This data "Female_ChLO"
had an outlier removed. When tested on the data before removing the outlier, I didn't encounter this error message.
The data does have a lot of NA
but they are vital to the test and I'm trying to include na.rm=T
but have no idea how to. Would love to hear suggestions but not too complicated please as I'm new to R.