Hi,

I have a 4D climate model output that I am trying to work with via raster,
and that is unfortunately giving problems. I create the object as a brick:

> b
class       : RasterBrick
dimensions  : 220, 254, 55880, 756  (nrow, ncol, ncell, nlayers)
resolution  : 1, 1  (x, y)
extent      : 0.5, 254.5, 0.5, 220.5  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84
data source : /home/mpayne/Documents/NACLIM/
ncep_07c_tho_all_1948-2010.mon.nc
names       : X19480131, X19480229, X19480331, X19480430, X19480531,
X19480630, X19480731, X19480831, X19480930, X19481031, X19481130,
X19481231, X19490131, X19490228, X19490331, ...
z-value     : 19480131, 20101231 (min, max)
varname     : var2
level       : 3

But I would like to drop a lot of the layers, so I try:

> dropLayer(b,1:5)
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘extent’ for signature
‘"character"’
>

And get a rather strange error.... Trying subset instead:

> subset(b,1:5)
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘extent’ for signature
‘"character"’
>
Gives the same error. I'm assuming that this is related to the 4D nature of
the data, as I can't reproduce it elsewise, e.g. using the examples... Any
ideas?

Best wishes,

Mark

	[[alternative HTML version deleted]]

