Nothing
matrixCorr
is a lightweight, high-performance package for computing
correlation matrices in R
. Numerically robust estimates for:
Designed for large matrices and tie-heavy data, matrixCorr
accepts
matrices or data frames, returns symmetric correlation matrices with
metadata, and includes convenient print()
and plot()
methods for
quick inspection.
Rcpp
kendall_tau()
function for matrices and data frames# Install from GitHub
# install.packages("devtools")
devtools::install_github("Prof-ThiagoOliveira/matrixCorr")
library(matrixCorr)
# Simulated data
set.seed(42)
mat <- cbind(A = rnorm(100), B = rnorm(100), C = rnorm(100))
# Compute Kendall's tau correlation matrix
ktau <- kendall_tau(mat)
# Print matrix
print(ktau)
# Visualize with ggplot2
plot(ktau)
library(matrixCorr)
# Simulated data with some ties
set.seed(123)
mat <- cbind(
A = sample(1:10, 100, replace = TRUE),
B = sample(1:10, 100, replace = TRUE),
C = rnorm(100)
)
# Compute Spearman's rho correlation matrix
spearman <- spearman_rho(mat)
# Print matrix
print(spearman)
# Visualize with ggplot2
plot(spearman)
library(matrixCorr)
# Simulated continuous data
set.seed(999)
mat <- cbind(
A = rnorm(100),
B = 0.5 * rnorm(100) + 0.5,
C = runif(100)
)
# Compute Pearson correlation matrix
pcorr <- pearson_corr(mat)
# Print matrix
print(pcorr)
# Visualize with ggplot2
plot(pcorr)
See inst/LICENSE for the full MIT license text.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.