# NOT RUN {
X1 <- scale( matrix( rnorm(100*300), 100,300), scale = FALSE)
usv <- svd(X1)
# Remove third principal component from X1 to produce X2
X2 <- usv$u[,-3] %*% diag(usv$d[-3]) %*% t(usv$v[,-3])
allCorrelations(X1,X2, ncomp1 = 5,ncomp2 = 5)
# }
Run the code above in your browser using DataLab