##The data matrix x is the scalled first four variables of "iris data" with m=4 and N=150.
x=scale(iris[,1:4])
##calculate and plot the RCC_PCA values of x after applying PCA.
myresults=RCC_PCA(x)
##lists the values of RCC criterion
myresults
Run the code above in your browser using DataLab