Code not working in "ChemometricsWithR" on Mac

The error message is self explanatory, there is nothing called wine.classes in your working environment, to help you overcome this problem, it would be useful if you could provide a reproducible example.

If you've never heard of a reprex before, you might want to start by reading this FAQ: