Which correlation method to use?

Which correlation method to use for my data? Pearson’s correlation or a robust correlation method to account for outliers or non-normality? A while ago, I wrote an R script to flexibly apply the correlation method based on the data at hand. I have found this script very useful for myself. So, I decided to share it with others. I hope you find it helpful too!