Function to return the length of the array in which
RasterLayers are organized.
1 2 3 4 5 6 7 8
## S4 method for signature 'XArray' length(x) ## S4 method for signature 'XArray' nlayers(x) ## S4 method for signature 'SpatialStack' nlayers(x)
length() function returns the number elements that should be present based on the array structure itself, and not the total number of values stored in the object (such as the
length method of
RasterStacks). As the object can contain missing values, the number of actual layers can be queried with
1 2 3 4 5 6 7 8 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.