Please I have been running a certain the codes below to read my image,
shapeffile to enable me classify for cover with Random forest. I have
gotten to the point of extracting the raster values and the raster
information. However I keep getting errors. though I have tried different
combination and other codes like readOGR for importing the training
polygon. I will be glad if you could be of help as I am new to using R.