Re: [R-sig-Geo] histogram of SpatialGridDataFrame values

2011-08-04 Thread Michael Sumner
More simply perhaps you can get any column by name or number like any data.frame - this gives all pixel values for the first attribute (assuming first colname is the default - use names(dem) to find out): dem$band1 dem[[1]] On Fri, Aug 5, 2011 at 12:04 PM, Nick Matzke wrote: > Nevermind, got

Re: [R-sig-Geo] histogram of SpatialGridDataFrame values

2011-08-04 Thread Nick Matzke
Nevermind, got it: as.matrix(dem) On 8/4/11 5:06 PM, Nick Matzke wrote: Hi, So I've loaded a DEM into a SpatialGridDataFrame, and I can plot it etc. However, I would like to make a histogram of the pixel values (or just a random sample of the pixel values) to help make decisions about the colo

[R-sig-Geo] histogram of SpatialGridDataFrame values

2011-08-04 Thread Nick Matzke
Hi, So I've loaded a DEM into a SpatialGridDataFrame, and I can plot it etc. However, I would like to make a histogram of the pixel values (or just a random sample of the pixel values) to help make decisions about the color scheme etc. Is there an easy way to do this? Cheers! Nick -- =