| exact_pvalue | R Documentation |
Computes the exact p-value for the correlation between two numeric variables using a specified correlation method.
exact_pvalue(x, y, method)
x |
Numeric vector representing the first variable. |
y |
Numeric vector representing the second variable. |
method |
Character string specifying the correlation method: '"spearman"', '"pearson"', or '"kendall"'. |
Numeric value representing the exact p-value.
Dongqiang Zeng
# Simulate data
set.seed(123)
x <- rnorm(100)
y <- rnorm(100)
p_val <- exact_pvalue(x = x, y = y, method = "spearman")
print(p_val)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.