Hello,

I'm trying to write out the values of a RasterBrick to a .txt file. Here's what I have:

b<-brick("file1.nc") 
vals<-getValues(b) 
write.table(vals,"file1.txt")

Where 'b' is a RasterBrick with dimensions [224,464,33] which corresponds to [lat,lon,time]. The output, 'vals' has dimensions [103936,33] which correspond to [cell#,time].

'b' has actual lat & lon associated with it's extent; I would like to write the .txt file so that it included 'vals' and the associated lat & lon. Right now, the output file has columns filled with cell# (lat*lon) and time, I would like for there to also be columns for lat and lon.

Any ideas?

Thanks,
Tiffany
	[[alternative HTML version deleted]]

