## Simulate data matrix with 500 variables and 10 observations
datasim = matrix(sample(0:100, 5000, replace = TRUE), nrow = 10)
## PCA
myPCA = PCA.GENES(datasim)
## Extracting the variance explained by each principal component
myPCA$var.exp
Run the code above in your browser using DataLab