layer: Return Stratum/Layer

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Simply return the layer for each observation in slot species.

Usage

1
2
3
4
## S4 method for signature 'Vegsoup'
layer(obj, ...)
## S4 method for signature 'Vegsoup'
layernumber(obj, ...)

Arguments

obj

Vegsoup* object

...

passed from to methods.

Details

Method layer simply returns the layer for each observation, equivalent to species(obj)$layer. layernumber returns layer assignments as an ordered integer.

Value

layer and layernumber return a vector equal in length to nrow(species(obj)).

Note

The function will be renamed to avoid typos with method layers or even dropped – it is not very useful and simple minded?

Author(s)

Roland Kaiser

See Also

layers, Vegsoup

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(barmstein)
x <- barmstein

# check the number of occurences per layer
table(layer(x))

# alternative
table(species(x)$layer)

# layer as integer
layernumber(x) 

vegsoup documentation built on Feb. 24, 2021, 3 a.m.