[RS-ecology] problem with RStoolbox

Dragan Kaludjerovic advancedgwt at gmail.com
Sat Dec 10 19:00:11 CET 2016


Hi,
I have just discover RStoolbox and try simple simple script

install.packages("RStoolbox")
install.packages(raster)

library(ggplot2)
library(raster)
library(rgdal)

data(img)

## Calculate NDVI
ndvi <- spectralIndices(img, red = "C:/R_examples/VI/B3.tif", nir =
"C:/R_examples/VI/B4.tif", indices = "NDVI")
ndvi


when I run it I got error message

Error in match(xi, names(img)) : object 'img' not found

Any suggestion is welcomed!

Best Regards,

Dragan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-wuerzburg.de/pipermail/rs-ecology/attachments/20161210/0a7d11e2/attachment.html>


More information about the RS-ecology mailing list