if (FALSE) {
# Create a random 100x50 matrix
X <- matrix(rnorm(5000), 100, 50)
# Compute thin QR decomposition
result <- bdQR(X, thin = TRUE)
# Verify the decomposition
# Should be approximately zero
max(abs(X - result$Q %*% result$R))
}
Run the code above in your browser using DataLab