This document summarizes a study that used R software to conduct a comparative petrographic analysis of volcanic rocks from five different areas in Indonesia. The study analyzed mineral percentage data from 89 rock samples using principal component analysis and cluster analysis. PCA identified three clusters influenced by different mineral variables. Cluster analysis also identified three clusters corresponding to Quaternary volcanic rocks, sedimentary rocks, and Tertiary volcanic rocks. The study demonstrated how multivariate statistics can help classify rock samples based on their mineral composition.