[R-sig-Geo] Coding and addition of explanatory variables

Julian Burgos ju||@n@burgo@ @end|ng |rom h@|ogv@tn@|@
Tue Jun 9 16:09:13 CEST 2020


Very hard to say without a reproducible example.  But perhaps "DVI1" is not in your "Trainingset" dataframe?


________________________________
From: R-sig-Geo <r-sig-geo-bounces using r-project.org> on behalf of Enoch Gyamfi Ampadu <egampadu using gmail.com>
Sent: Tuesday, June 9, 2020 14:06
To: Help R-Sig_Geo <r-sig-geo using r-project.org>
Subject: [R-sig-Geo] Coding and addition of explanatory variables

Dear List,

Please I am doing a biomass analysis with a satellite image. The
explanatory variables include the satellite bands and vegetation indices. I
am using Random forest regression. I have added bands of the satellite
image to the model and it worked. However, when I tried to add the
vegetation indices (bands) I get error messages. I have put the codes I am
using below;

Model <- randomForest(class~ B1 + B2 + B3 + B4 + B5 + B6 + B7 + B8 + B9 +
B10 + B11 + B12 + DVI1, data = Trainingset, proximity=TRUE,
                            importance=TRUE).
The "DVI1" is the vegetation index variable band I tried to add to the
model.

Below is the error message I received.

"Error in eval(predvars, data, env) : object 'DVI1' not found"

   I will be glad if I could get some assistance on how to resolve it.

Best regards,

Enoch

--
*Enoch Gyamfi - Ampadu*

*Geography & Environmental Sciences*

*College of Agriculture, Engineering & Science*

*University of KwaZulu-Natal, Westville Campus*

*Private Bag X54001*
*Durban, South Africa **� 4000**.*
*Phone: +27 835 828255*

*email: egampadu using gmail.com <egampadu using gmail.com>*


*skype: enoch.ampadu*
*The highest evidence of nobility is self-control*.

*A simple act of kindness creates an endless ripple*.

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo using r-project.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-geo&data=02%7C01%7C%7C040a519515414dcf4ff508d80c7e6133%7C8e105b94435e4303a61063620dbe162b%7C0%7C0%7C637273084221502390&sdata=yL%2BLWXZWZ0EaUNEXxLXpWnkkOgKeMriuuuJR47MUIhI%3D&reserved=0

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list