<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>