Types or Methods of Testing Correlation Suppose I have two variables, which have over 500 data points per variable (though they are not continuous on timeline). what other kind of methods or test in can use in R to test the correlation? Except Pearson, Kendall and Spearman
I know how to do Pearson and Spearman and Kandall test (which is quite basic to my personal opinion). 
And if I want to study further about the type of correlation, such as the causality of one to another variable or predictive power of one variable to another. What test is available in R? 
P.S. I am a rookie in R. So if u can venture a example in code or package name would be perfect! 
 A: There are basicly three types of correlation tests
a pearsons correlation is the most common. 
It assumes that the data is normally distributed.
To figure out if your variables are normally or non-normally distributed you can use a shapiro-wilk test like this: shapiro.test(variable) info here: https://stackoverflow.com/questions/15427692/perform-a-shapiro-wilk-normality-test . 
If your p-value is below <= 0.05, then you would reject the NULL hypothesis that the samples came from a Normal distribution.
If not then you cannot reject the null hypothesis that the data is normally distributed, e.i above 0.05. In other words you can savely (without violating assumptions) do a correlation like this: 
cor.test(variable1, variable1, method="pearson")

If the variables are non-normally distributed then you have to use a different correlation test, called "spearmans"
cor.test(variable1, variable1, method="spearman")

A spearmans test works by ranking the data, such that the lowest value is assigened to 1, secondlowest to 2 and so on.
If there are many values that are identical, it will give several tied ranks, if you have a lot of tied ranks or if you have a small data set then a method called "kendall" is more appropriate (or won't give biased estimates of the p-value).
cor.test(variable1, variable1, method="kendall")

You could if you wanted to write it in code like this: 
df<-data.frame(x=rnorm(100),y=rnorm(100))
sp_Cov1 <- shapiro.test(df[,1])
sp_Cov2 <- shapiro.test(df[,2]) 
if(sp_Cov1[2] < 0.05 | sp_Cov2[2] < 0.05) {correlationToUse = 'kendall'
} else {correlationToUse = 'pearson'}

cortest_pvalue<-as.numeric(format((cor.test(df[,1],df[,2], method = correlationToUse)[3]),digits=5,scientific=FALSE))

in this case the correlation would be method="pearson" since it was generated from a normal distribution 
There is also a boot-strap correlation for non-parametric data with a low sample size, but i know nothing about it.
I would recommend the book Discovering Statistics Using R - by Andy Fields for more info
