Learn R Programming

SpaDES (version 1.0.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)

## S3 method for class 'list':
layerNames(object)

## S3 method for class 'SpatialPoints':
layerNames(object)

## S3 method for class 'SpatialPolygons':
layerNames(object)

## S3 method for class 'SpatialLines':
layerNames(object)

## S3 method for class 'Raster':
layerNames(object)

## S3 method for class 'gg':
layerNames(object)

## S3 method for class 'histogram':
layerNames(object)

## S3 method for class '.spadesPlot':
layerNames(object)

## S3 method for class 'igraph':
layerNames(object)

Arguments

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