Learn R Programming

vegtable (version 0.1.3)

subset: Subset functions for vegtable objects.

Description

Produce subsets of '>vegtable objects.

Usage

# S4 method for vegtable
subset(x, subset, slot="header", keep_children=FALSE,
	keep_parents=FALSE, ...)

Arguments

x

A '>vegtable object for subset.

subset

Logical vector or operation for subset.

slot

Slot to be applied for subset.

keep_children

Argument passed to subset.

keep_parents

Argument passed to subset.

...

Further arguments passed from or to other methods.

Value

A S4 object of class '>vegtable.

Details

This function generate subsets of '>vegtable objects through logical operations. Such operations can be applied either to the plots, or the relations, which are the main slots in that class.

This method can be referred to the slot species the same way as subset, then the rest of the data will include only references to the subset of species list.

Examples

Run this code
# NOT RUN {
library(vegtable)
data(dune_veg)
summary(dune_veg)

## Select plots used as pastures
Pastures <- subset(dune_veg, Use == "Pasture", slot="header")
summary(Pastures)
# }

Run the code above in your browser using DataLab