cov.matrix.1 <- cov(matrix(rnorm(30*10), 30, 10))
cov.matrix.2 <- cov(matrix(rnorm(30*10), 30, 10))
colnames(cov.matrix.1) <- colnames(cov.matrix.2) <- sample(letters, 10)
rownames(cov.matrix.1) <- rownames(cov.matrix.2) <- colnames(cov.matrix.1)
srd.output <- SRD(cov.matrix.1, cov.matrix.2)
#lists
m.list <- RandomMatrix(10, 4)
srd.array.result = SRD(m.list)
#divergent traits
colnames(cov.matrix.1)[as.logical(srd.output$model$code)]
#Plot
plot(srd.output)
## For the array generated by SRD(m.list) you must index the idividual positions for plotting:
plot(srd.array.result[1,2][[1]])
plot(srd.array.result[3,4][[1]])
if (FALSE) {
#Multiple threads can be used with some foreach backend library, like doMC or doParallel
library(doMC)
registerDoMC(cores = 2)
SRD(m.list, parallel = TRUE)
}
Run the code above in your browser using DataLab