Chapter 5 Using Near-Infrared Spectroscopy in Agricultural Systems