[R-sig-Geo] Random forest script - problems with training areas polygon?
Silvia Flaherty
@ilvi@@fl@herty @ending from gm@il@com
Wed Nov 7 14:35:35 CET 2018
Hi all,
I have been working with the random forest R script and have had no
problems at all up to now.
I recently modified the training areas shapefile. It´s actually an edited
version of the original shapefile (which worked just fine). Same
projection, etc, only the areas are smaller and more specific. That's the
only input I changes. The script reads the shapefile but it doesn't do the
classification.
The error I get is:
Error in `[.data.frame`(satValues, , 2) : undefined columns selected
Checking line by line, he problem seems to be (line 139 of the loop):
satValues <- extract(satImage, class_data[i,], cellnumbers=TRUE, df=TRUE)
I´m not very skilled at using R but I´m quite OK with GIS. I have tried
editing the shapefile again, saving it as another file, etc. Same result.
Any ideas what could be going wrong?
Thanks!
Silvia
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#m_542342069031620777_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list