Dear list members,

I am trying to plot a raster that represent a categorical variable (land
cover) using spplot, but I got and error.  I don´t get the problem when I
use plot or levelplot.

> cobertura
class       : RasterLayer
dimensions  : 780, 1296, 1010880  (nrow, ncol, ncell)
resolution  : 30, 30  (x, y)
extent      : 530156.6, 569036.6, 1092167, 1115567  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=500000 +y_0=0
+datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0
data source :
C:\Users\Manuel\Documents\Documentos_personales\Proyectos_en_R\Panthera\cobertura.tif
names       : cobertura
values      : 1, 11  (min, max)
attributes  :
       ID          cobertura
 from:  1             Bosque
 to  : 11 Vegetación anegada

> spplot(cobertura)
Error in seq.default(zrng[1], zrng[2], length.out = cuts + 2) :
  'from' cannot be NA, NaN or infinite
In addition: Warning messages:
1: In extend.limits(range(as.numeric(z), finite = TRUE)) :
  NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf

Best,

Manuel

-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola@una.ac.cr
mspinola10@gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río <https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

	[[alternative HTML version deleted]]

