[R-sig-Geo] Error when accessing raster layer (package 'raster')

Johannes Radinger johannesradinger at gmail.com
Mon Feb 18 11:03:03 CET 2013


Robert,
yes updating solved the problems; Somehow I did not realize that my package
is out of date ;)

Johannes

On Fri, Feb 15, 2013 at 6:03 PM, Robert J. Hijmans <r.hijmans at gmail.com> wrote:
> Johannes,
> Please update the raster package and try again --- that is always a
> good procedure when you get an error message.
> Robert
>
> On Fri, Feb 15, 2013 at 1:22 AM, Johannes Radinger
> <johannesradinger at gmail.com> wrote:
>> Hi,
>>
>> I have a rasterbrick and when I try to access a single layer of it I
>> get following error:
>>>  my_brick[["layer_1"]]
>> class       : RasterLayer
>> dimensions  : 912, 840, 766080  (nrow, ncol, ncell)
>> resolution  : 50, 50  (x, y)
>> extent      : 3505300, 3547300, 6025800, 6071400  (xmin, xmax, ymin, ymax)
>> coord. ref. : +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0
>> +ellps=bessel +datum=potsdam +units=m +no_defs
>> +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7
>> values      : in memory
>> layer name  : layer_1
>> min value   : 0
>> max value   : 0.1841621
>> Error in if (is.factor(object)) { : missing value where TRUE/FALSE needed
>>
>> The rasterbrick is created by a rasterstack (approx. 15 layers) that
>> is masked using the function mask.
>> When I try to access the same layer in the unmasked rasterstack I
>> don't get the error.
>>
>> Any suggestions?
>>
>> I am using R 2.15.2 with raster 2.0-08 (27-June-2012) on Ubuntu.
>>
>> best regards,
>> /Johannes
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list