I am trying to export data frame to tiff format

Dear Ma'am/ sir

I am using night-time light satellite data. I have performed a calibration method between two satellite data for the same year. for which I had converted the tiff file to dataframe. Now I need to export the data frame to tiff format. following are the codes I tried but some error is shown

library (sp)
library (raster)
library (rgdal)

writeRaster(NTL_new2, "E:\phd\data\calliberation test\rstudio\test.tif", format="GTiff", overwrite=TRUE)

Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘writeRaster’ for signature ‘"data.frame", "character"’

can anyone guide me how to go about

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.