Skip to content

writeRaster error [Error in dim.create.ncdf(nc, d, verbose) : NA/NaN/Inf in foreign function call (arg 5)]

2 messages · Aseem Sharma, Robert J. Hijmans

#
Aseem provided me with some more info. writeRaster fails when the
'z-value' cannot be converted to an integer. In his case:
[1] "1950 Q1" "1950 Q2" "1950 Q3" "1950 Q4" "1951 Q1" "1951 Q2"

The work around is to change these values using the setZ function.
This has been fixed (with a warning) for the next version of the raster package.

Robert

PS. always show sessionInfo(), traceback() and do not include very
large amounts of data in your postings!
On Mon, Mar 3, 2014 at 11:00 AM, Aseem Sharma <nature.aseem at gmail.com> wrote: