[R-sig-Geo] help with dismo biovars when using rasterStacks
Robert Hijmans
r.hijmans at gmail.com
Wed Jan 12 18:06:16 CET 2011
Meg,
> Hello.
> I'm trying to work my way through creating the bioclim variables using the
> biovars function.
> (...)
> out <- brick(raster(prec))
> out at data@nlayers <- 19
I think this should have been
out at data@nlayers <- as.integer( 19 )
I fixed the function in version 0.5-13, and the below works
library(dismo)
tmin = tmax = prec = brick(nrow=1, ncol=1)
tmin <- setValues(tmin, t(matrix(c(10,12,14,16,18,20,22,21,19,17,15,12))))
tmax <- tmin + 5
prec <- setValues(prec, t(matrix(c(0,2,10,30,80,160,80,20,40,60,20,0))))
b <- biovars(prec, tmin, tmax)
as.matrix(b)
Robert
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/help-with-dismo-biovars-when-using-rasterStacks-tp5913584p5915338.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list