Learn R Programming

SpaDES (version 1.3.1)

layerNames: Extract the layer names of Spatial Objects

Description

There are already methods for Raster* objects. This adds methods for SpatialPoints*, SpatialLines*, and SpatialPolygons*, returning an empty character vector of length 1. This function was created to give consistent, meaningful results for all classes of objects plotted by Plot.

Usage

layerNames(object)

# S4 method for list layerNames(object)

# S4 method for ANY layerNames(object)

# S4 method for Raster layerNames(object)

# S4 method for .spadesPlot layerNames(object)

# S4 method for igraph layerNames(object)

Arguments

object

A Raster*, SpatialPoints*, SpatialLines*, or SpatialPolygons* object; or list of these.