Hi, I am trying to initialize an empty stack with

require(raster)
a.stack <- stack()
for (yr in seq(2000,2008)){
....
a.layer = raster(something).

a.stack <- addLayer(a.stack, a.layer)
}

Even if I just run a.stack <- stack() in the commandline:
> stack()
Error in as.list(x) : argument "x" is missing, with no default

I know I've done this in the past and the help file for stack() says x can
be missing to create an empty stack. Could someone help me debug or suggest
a workaround?
Thanks
Dominik

	[[alternative HTML version deleted]]

