Hello.
I make grids and Object of class SpatialPixels not are atrributes?
Pozdrawiam
Agnieszka
#data
 setwd("/home/agnieszka/
Pulpit/dane1")
> alu <- read.csv("cooral.csv", header = TRUE, sep = ",")
> coordinates(alu) = ~x+y
> attributes(alu) = al
Error: object 'al' not found
> alu.sp = spsample(alu, type = "regular", cellsize = c(50,50))
> gridded(alu.sp) = TRUE
> summary(alu.sp)
Object of class SpatialPixels
Coordinates:
       min     max
x1 4384052 4393102
x2 5569919 5579319
Is projected: NA
proj4string : [NA]
Number of points: 34028
Grid attributes:
   cellcentre.offset cellsize cells.dim
x1           4384077       50       181
x2           5569944       50       188
>  # promote to SpatialPixelsDataFrame
> gridded(alu.sp) <- TRUE
> # creates the full grid
> alu.sg = as(alu.sp, "SpatialGridDataFrame")
> summary(alu.sg)
Error in .subset2(x, i, exact = exact) : subscript out of bounds
Error in summary(object@data[[1]]) :
  error in evaluating the argument 'object' in selecting a method for
function 'summary'
> class(alu.sg)
[1] "SpatialGridDataFrame"
attr(,"package")
[1] "sp"
>

	[[alternative HTML version deleted]]

