I would like to generate correlations between years in a dataset in R, however I keep getting the following error:
cor.test(y2013$CA,y2011$CA, method="spearman", use="complete")
Error in cor(x, y, use = use, method = method) : incompatible dimensions In addition: Warning message: In cbind(x, y) : number of rows of result is not a multiple of vector length (arg 2)
y2013 and y2011 are not the same in length, however I thought by using the command "complete" this would eliminate this problem