Learn R Programming

vegtable (version 0.1.3)

set_pseudo,set_group,set_formula: Set slots in shaker objects.

Description

Building '>shaker objects for Cocktail classifications.

Usage

# S4 method for shaker,taxlist,character
set_pseudo(shaker, companion, pseudo,
	pseudo_id, authority=FALSE, enc_cont="latin1", enc_gr="utf8", ...)

# S4 method for shaker,vegtable,character set_pseudo(shaker, companion, pseudo, ...)

# S4 method for shaker,taxlist,character set_group(shaker, companion, group, group_id, authority=FALSE, enc_cont="latin1", enc_gr="utf8", ...)

# S4 method for shaker,vegtable,character set_group(shaker, companion, group, ...)

# S4 method for shaker,taxlist,character set_formula(shaker, companion, formula, formula_id, authority=FALSE, enc_cont="latin1", enc_gr="utf8", ...)

# S4 method for shaker,vegtable,character set_formula(shaker, companion, formula, ...)

Arguments

shaker

Object of class '>shaker to be modified.

companion

Either a '>taxlist or a '>vegtable object.

pseudo,group

Character vector with names of taxa included in a pseudo-species or a species group.

formula

Character vector including a formula as definition of a vegetation unit.

pseudo_id,group_id,formula_id

Character value as name of the pseudo-species, species group or defined vegetation unit.

authority

Logical value indicating whether author names should be included in the taxon name or not.

enc_cont,enc_gr

Encodings used for special characters.

...

Further arguments passes from or to other methods.

Value

A '>shaker object.

Details

These functions are implemented for constructing or complementing '>shaker objects. Note that construction of those objects will always require a 'companion' object, which is either an object of class '>taxlist or '>vegtable.

See Also

'>shaker, make_cocktail.

Examples

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

## Construct the 'shaker' object anew
Wetlands <- new("shaker")

## Set a pseudo-species
Wetlands <- set_pseudo(Wetlands, Wetlands_veg, c("Cyperus latifolius",
				"Cyperus exaltatus"))

## Set a species group
Wetlands <- set_group(Wetlands, Wetlands_veg, group_id="Cyperus papyrus",
		group=c(
                "Cyperus papyrus",
                "Cyclosorus interruptus",
                "Lepistemon owariense"))

## Set a fromula
Wetlands <- set_formula(Wetlands, Wetlands_veg, formula_id="HE1",
		formula="groups:'Cyperus papyrus' | species:'Cyperus papyrus > 50'")

## Summaries
summary(Wetlands)
summary(Wetlands, Wetlands_veg)
# }

Run the code above in your browser using DataLab