# Draw some data
X1 <- matrix(rnorm(1000), ncol = 10)
X2 <- matrix(rnorm(1000, mean = 0.5), ncol = 10)
# calculate projections separately (only for demonstration)
# \donttest{
dwdProj(X1, X2)
# }
svmProj(X1, X2)
# Use within DiProPerm test
# Note: For real applications, n.perm should be set considerably higher
# No permutations chosen for demonstration due to runtime
# \donttest{
if(requireNamespace("DWDLargeR", quietly = TRUE)) {
DiProPerm(X1, X2, n.perm = 10, dipro.fun = dwdProj)
}
if(requireNamespace("e1071", quietly = TRUE)) {
DiProPerm(X1, X2, n.perm = 10, dipro.fun = svmProj)
}
# }
Run the code above in your browser using DataLab