powered by
XY performs permutation test on correlation coefficients.
XY
XY(a, b, rand = 9999, seed = 1, method = c("pearson", "kendall", "spearman"))
XY returns an one-row data frame with 2 columns:
cor
the correlation coefficient.
pval
the p-value.
a numeric vector, the first variable.
a numeric vector, the second variable.
an integer, the number of randomization samples. The default value is 9999.
an integer, the seed for random number generation. Setting a seed ensures the reproducibility of the result. See set.seed for more details.
set.seed
correlation coefficient, "pearson", "kendall", or "spearman".
cor.test
with(subset(ctm_Cu, run == "Jan"), XY(sediment, porewater))
Run the code above in your browser using DataLab