Perform rapid (parallel) unweighted and weighted (partial) correlations on a matrix
fcor.Rd
Perform rapid (parallel) unweighted and weighted (partial) correlations on a matrix
Arguments
- x
matrix of variables over which to calculate pairwise correlations
- covs
matrix of variables that serve as covariates
- covs_alt
alternate matrix of variables that serve as covariates when pairwise correlation is not complete
- w
vector of weights
- n_cores
number of cores over which to parallelize
- verbose
logical; report what correlations are being calculate
Examples
if (FALSE) { # \dontrun{
data <- data.frame(matrix(rnorm(100 * 50), ncol = 50))
covs <- data.frame(matrix(rnorm(100 * 2), ncol = 2))
names(covs) <- c("C1", "C2")
wgt <- 1/runif(100)
fcor(x = data, covs = covs, w = wgt, n_cores = 1, verbose = TRUE)
} # }