Last chance! 50% off unlimited learning
Sale ends in
Get or set the names of the layers of a Raster* object
# S4 method for Raster
names(x)# S4 method for Raster
names(x)<-value
# S4 method for Raster
labels(object)
Character
Raster* object
Raster* object
character (vector)
nlayers, bands
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)
Run the code above in your browser using DataLab