Dear Vikram,
I have update the RemoteSensing package in order to easily compute the DN to reflectance conversion. 
For Unix system you should be able to update RemoteSensing to 0.4.2 with this updates. On Windows you have to wait a little more.
 
try:
metafile <- system.file("external/L71129046_04620080329_MTL.txt", package="RemoteSensing")
img <- landsat(metafile)
 
ref  <- dn2ref(img) # this creates a Landsat object (modified rasterBrick object)
# if you need to perform the conversion of thermal bands to LST:
# ref  <- dn2temp(ref)
 
#plot(ref)
#x11()
#plot(ref@thermal)
 
# see ?ndvi # for possible indices
# compute NDVI
LSndvi <- ndvi(raster(ref,layer=3),raster(ref,layer=4))
#x11()
#plot(LSndvi)
 
# saving with:
LSndvi <- writeRaster(LSndvi,"/path/outfilename.outformat")
 
# I hope this makes it little easier, Cheers Matteo


>>> Vikram Ranga <babuawara@gmail.com> 18.01.2012 10:49 >>>
Hello list,
I am working with landsat images and would like to create a phenological 
cycle with NDVI.
I am using R for that but NDVI values changes if i use on sensor 
reflectance instead of DN values i.e. giving different result in every case.
I tried to compare histograms seems to have changed and I am not getting 
negative values where there is no vegetation but if i use DN values it 
gives negative values to such locations. Do anybody have any idea what 
went wrong??

Thanks in advance and would be much appreciated.

Vikram

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

	[[alternative HTML version deleted]]

