[R] Values cells

Frede Aakmann Tøgersen frtog at vestas.com
Wed Apr 16 20:44:46 CEST 2014


Well, if you are using the print method on a raster object  what do you get then?

Try this:

> library(raster)
Loading required package: sp
>      logo <- raster(system.file("external/rlogo.grd", package="raster")) 
> print(logo)
class       : RasterLayer 
band        : 1  (of  3  bands)
dimensions  : 77, 101, 7777  (nrow, ncol, ncell)
resolution  : 1, 1  (x, y)
extent      : 0, 101, 0, 77  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=merc 
data source : c:\Programmer\R\R-3.0.2\library\raster\external\rlogo.grd 
names       : red 
values      : 0, 255  (min, max)

See the values entry. Since this is a color image there are 3 bands. What you see above is for the first band ("red").

Going from 0 to 255 for red is no surprise. You will probably see the same for green and blue as well.

What are you really looking for?

Yours sincerely / Med venlig hilsen


Frede Aakmann Tøgersen
Specialist, M.Sc., Ph.D.
Plant Performance & Modeling

Technology & Service Solutions
T +45 9730 5135
M +45 2547 6050
frtog at vestas.com
http://www.vestas.com

Company reg. name: Vestas Wind Systems A/S
This e-mail is subject to our e-mail disclaimer statement.
Please refer to www.vestas.com/legal/notice
If you have received this e-mail in error please contact the sender. 

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> On Behalf Of Alexsandro Cândido de Oliveira Silva
> Sent: 16. april 2014 20:07
> To: r-help at r-project.org
> Subject: [R] Values cells
> 
> Hi folks,
> 
> I'm using the raster package.
> 
> I need to get the min and max values between the cells of a raster,
> something like this: [min, max]. How?
> 
> 
> 
> ---
> Este email está limpo de vírus e malwares porque a proteção do avast!
> Antivírus está ativa.
> 
> 
> 	[[alternative HTML version deleted]]




More information about the R-help mailing list