# NOT RUN {
X1 <- matrix(rnorm(100*300),100,300)
usv <- svd(X1)
X2 <- usv$u[,-3] %*% diag(usv$d[-3]) %*% t(usv$v[,-3])
RV(X1,X2)
RV2(X1,X2)
RVadj(X1,X2)
# Missing data
X1[c(1, 50, 400, 900)] <- NA
X2[c(10, 200, 450, 1200)] <- NA
RV(X1,X2, impute = TRUE)
RV2(X1,X2, impute = TRUE)
# }
Run the code above in your browser using DataLab