1. Data on plant elemental stoichiometry are essential for ecologists investigating ecosystem function, nutrient cycling, plant-herbivore interactions and leaf economics.
2.A cost-effective approach to leaf elemental analysis is near-infrared spectroscopy (NIRS), whereby components such as carbon (C), nitrogen (N), phosphorus (P) and potassium (K) can be predicted using NIR spectra from plant material. However, a major factor limiting the widespread use of NIRS by plant ecologists is the availability of free software and calibration data for developing plant chemistry datasets from spectra. Here, we present a pair of companion r packages ('plantspec' and 'plantspecDB') that satisfy this need by providing an entire workflow, from spectra to predicted elemental data.3. The main r package, called 'plantspec', allows users to manipulate spectral data and develop custom partial least square (PLS) models for predicting the elemental composition of their own datasets. The second package, 'plantspecDB', provides NIR spectra, and matched elemental data obtained with standard analytical techniques, for herbaceous samples collected from 18 grassland sites around the world, primarily sourced from the Nutrient Network experiment. The 'plantsp-ecDB' data package also provides calibrations for C, N, P and K for bulk samples and separated by plant functional type: grasses, forbs and legumes. Finally, we provide an example of the 'plantspec' workflow, and external validation of these models, and an example application to the stoichiometry of East African grasses as it relates to their evolutionary relationships. 4. The r package 'plantspec', and our associated workflow, provides a template to produce robust calibration models and increase the application of NIR in ecology.Although, we focus on plant stoichiometry, the workflow presented here can be applied broadly for a broad range of applications, including soils, remote sensing data, solutions and tissues. Finally, our global dataset provides unprecedented access to NIR calibration data as they pertain to tissue concentrations of key plant limiting elements. K E Y W O R D S carbon, Near Infrared Spectroscopy (NIR) spectroscopy, nitrogen, Partial Least Squares Regression (PLS), R, phosphorus, plant ecology and evolution, stoichiometry then sent to either Kansas State University (KSU) or North Carolina State University (NCSU) for analysis of carbon, nitrogen, phosphorus and potassium (%). A selection of other nutrients, including the monovalent cation Na, as well as Ca and Mg, produced less reliable calibrations (Anderson, 2018) and are not reported here. The samples were sourced from 18 globally distributed sites.