layers2samples: Add information from slot 'layers' into slot 'samples'

layers2samplesR Documentation

Add information from slot 'layers' into slot 'samples'

Description

Slot layers may include additional information that should be moved to samples in order to use it by subset(), aggregate() or crosstable() methods.

If names of variables are not provided, all variables from the respective layer table will be inserted in slot samples.

Usage

layers2samples(object, layer, variable, ...)

## S4 method for signature 'vegtable,character,character'
layers2samples(object, layer, variable, ...)

## S4 method for signature 'vegtable,character,missing'
layers2samples(object, layer, variable, ...)

Arguments

object

An object of class vegtable.

layer

Character value indicating a target layer.

variable

Character vector with the names of variables to be inserted in slot samples.

...

Further arguments to be passed among methods.

Value

An object of class vegtable with variables added to samples.

Author(s)

Miguel Alvarez kamapu78@gmail.com.


kamapu/vegtables documentation built on Feb. 17, 2024, 8:29 a.m.