File: names.Rd

package info (click to toggle)
r-cran-raster 3.6-31-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,300 kB
  • sloc: cpp: 2,367; ansic: 1,572; sh: 13; makefile: 2
file content (52 lines) | stat: -rw-r--r-- 780 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
\name{names}

\alias{labels,Raster-method}
\alias{names}
\alias{names<-}
\alias{names,Raster-method}
\alias{names,RasterStack-method}
\alias{names<-,Raster-method}

  
\title{Names of raster layers}

\description{
Get or set the names of the layers of a Raster* object 
}

\usage{
\S4method{names}{Raster}(x)

\S4method{names}{Raster}(x)<-value

\S4method{labels}{Raster}(object)
}

\arguments{
  \item{x}{Raster* object}
  \item{object}{Raster* object}  
  \item{value}{character (vector)}
}

\value{
Character 
}


\seealso{ \code{\link{nlayers}, \link[raster]{bands}} }


\examples{
r <- raster(ncols=5, nrows=5)
values(r) <- 1:ncell(r)
s <- stack(r, r, r)
nlayers(s)
names(s)
names(s) <- c('a', 'b', 'c')
names(s)[2] <- 'hello world'
names(s)
s
labels(s)
}

\keyword{spatial}