Analysis of hyperspectral data sets very often requires application of repetitive procedures. Proposed solution based on the R open source Environment has a number of advantages including cost-effectiveness, transferability and scalability. Code-driven analysis complies with the reproducible research requirements. R platform can be used for the analysis of infrared spectra of various types of food samples allowing for dimension reduction, clustering and finally identification and visualization.