Skip to content
Prev 21320 / 29559 Next

writeRaster give error "no slot of name "file" for this object..."

s is not updated with the file name of your output grid just by a call 
to writeStart, you need to assign the result of writeStart to s:

s <- writeStart(s, filename = 'landuse4BA.grd', overwrite =TRUE)

See the output of str(s) before and after the call to writeStart to see 
the difference. Then it should be possible to write values to the file 
as well.

Cheers,
Jon
On 16-Jul-14 6:43, Herry wrote: