as.list: Create a list of RasterLayer objects

Description Usage Arguments Value Examples

Description

Create a list of RasterLayer objects from Raster* objects

Usage

1
2
## S4 method for signature 'Raster'
as.list(x, ...)

Arguments

x

Raster* object

...

additional Raster* objects

Value

list

Examples

1
2
3
4
5
6
r <- raster(ncol=3, nrow=3)
r[] <- 1:ncell(r)
as.list(r)

s <- stack(r,r*2,r*3)
as.list(s, r)

Example output

Loading required package: sp
NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
[[1]]
class       : RasterLayer 
dimensions  : 3, 3, 9  (nrow, ncol, ncell)
resolution  : 120, 60  (x, y)
extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 
data source : in memory
names       : layer 
values      : 1, 9  (min, max)


NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
[[1]]
class       : RasterLayer 
dimensions  : 3, 3, 9  (nrow, ncol, ncell)
resolution  : 120, 60  (x, y)
extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 
data source : in memory
names       : layer.1 
values      : 1, 9  (min, max)


[[2]]
class       : RasterLayer 
dimensions  : 3, 3, 9  (nrow, ncol, ncell)
resolution  : 120, 60  (x, y)
extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 
data source : in memory
names       : layer.2 
values      : 2, 18  (min, max)


[[3]]
class       : RasterLayer 
dimensions  : 3, 3, 9  (nrow, ncol, ncell)
resolution  : 120, 60  (x, y)
extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 
data source : in memory
names       : layer.3 
values      : 3, 27  (min, max)


[[4]]
class       : RasterLayer 
dimensions  : 3, 3, 9  (nrow, ncol, ncell)
resolution  : 120, 60  (x, y)
extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 
data source : in memory
names       : layer 
values      : 1, 9  (min, max)

raster documentation built on Nov. 17, 2017, 5:51 a.m.