<html><head></head><body lang="en-GB" style="background-color: rgb(255, 255, 255); line-height: initial;">                                                                                      <div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Dear Dragan,</div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">'img' is just a placeholder for the name of your multispectral raster. Please import a raster with brick() und replace 'img' with the name of this object.</div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Regards, Martin</div>                                                                                                                                     <div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br style="display:initial"></div>                                                                                                                                                                                                   <div style="font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"></div>                                                                                                                                                                                  <table width="100%" style="background-color:white;border-spacing:0px;"> <tbody><tr><td colspan="2" style="font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);">                           <div style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in 0in; font-family: Tahoma, 'BB Alpha Sans', 'Slate Pro'; font-size: 10pt;">  <div><b>From: </b>Dragan Kaludjerovic</div><div><b>Sent: </b>Saturday, December 10, 2016 19:00</div><div><b>To: </b>RS-ecology@lists.uni-wuerzburg.de</div><div><b>Subject: </b>[RS-ecology] problem with RStoolbox</div></div></td></tr></tbody></table><div style="border-style: solid none none; border-top-color: rgb(186, 188, 209); border-top-width: 1pt; font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);"></div><br><div id="_originalContent" style=""><div dir="ltr"><div><div>Hi,<br></div>I have just discover RStoolbox and try simple simple script<br><br><span style="color:rgb(0,0,255)"><span style="background-color:rgb(255,255,255)">install.packages("RStoolbox")<br>install.packages(raster)<br><br>library(ggplot2)<br>library(raster)<br>library(rgdal)<br><br>data(img)<br><br>## Calculate NDVI<br>ndvi <- spectralIndices(img, red = "C:/R_examples/VI/B3.tif", nir = "C:/R_examples/VI/B4.tif", indices = "NDVI")<br>ndvi</span></span><br><br><br></div>when I run it I got error message <br><br><pre tabindex="0" class="gmail-GODMDAHBLOB" id="gmail-rstudio_console_output" style="font-family:"lucida console";font-size:10pt;outline:medium none;border-width:medium;border-style:none;border-color:-moz-use-text-color;word-break:break-all;margin:0px;white-space:pre-wrap;line-height:15px;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255)"><span class="gmail-GODMDAHBFOB gmail-ace_constant" style="color:rgb(197,6,11)">Error in match(xi, names(img)) : object 'img' not found<br><br></span></pre>Any suggestion is welcomed!<br><br>Best Regards,<br><br>Dragan</div>
<br><!--end of _originalContent --></div></body></html>