coverscale: Set or Retrieve an Abundance Scale for 'Vegsoup*' Objects

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

Description

Function Coverscale creates an object of class Coverscale containing a definition for an ordinal scale, or alternatively setting up a Coverscale object representing species abundances on a continuous scale (counts, frequencies or percentages). Objects of this class are mandatory for Vegsoup and it's extending classes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
Coverscale(name, codes, lims)

## S4 method for signature 'Vegsoup'
coverscale(x)

## S4 replacement method for signature 'Vegsoup,Coverscale'
coverscale(x) <- value

## S4 replacement method for signature 'Vegsoup,character'
coverscale(x) <- value

## S4 method for signature 'Vegsoup'
is.ordinal(x)

## S4 method for signature 'Vegsoup'
is.continuous(x)

## S4 method for signature 'Vegsoup'
is.occurence(x)

Arguments

name

character. Giving a name of a built in abundance scale, or a name to be referred to a user supplied definition.

codes

character. Vector assigning the level codes (ordinal scales). No need to define zero.

lims

numeric. Vector defining the mean percentage cover for each entry in codes. Need to not define zero.

x

A Vegsoup* object.

value

A Coverscale object or a character specifying a coverscale as accepted by argument name of function Coverscale.

Details

The constructor Function Coverscale creates an object of class "Coverscale", whereas method coverscale (lower case letters!) returns the abundance scale set up for an Vegsoup* object. The corresponding replacement method ("coverscale<-") can be used to assign a different scale for an object where it has already been set. Most of the time it is convenient to use one of the built in definitions. Call Coverscale() without arguments to see which ones are available. Note, a continuous scale can simply be defined by having a value of NULL for slots 'codes' and 'lims' (cf. Coverscale("percentage")). Coverscale("as.is") is an alternative to percentage, frequency or counts. All treat the data as it is and do not translate it to percentage cover values. "as.is" is appropriate, for example, if the data is coded with integers (e.g. Van der Maarel scale). Coverscale("ordinal") defines breakpoints to translate to percentage cover values.

The methods is.continuous and is.ordinal test objects of class "Coverscale" if they conform to the given type of cover scale. Note, this is just a simple test if slots 'codes' and 'lims' are NULL. If so, the coverscale is treated as continuous, otherwise as ordinal. There are methods defined for Vegsoup* object (see ‘Examples’).

The replacement function can also be used to transform a continuous scale to an ordinal one. This functionality is restricted to situations where is.continous(x) evaluates to TRUE and the "Coverscale" object that is assigned (argument value) can be treated as ordinal (is.ordinal(value) evaluates to TRUE). When doing so, the cover values stored in the Vegsoup* object are transformed (the original data is lost) and a message is issued. Such a type of transformation makes sense, for example, when an output of function link{write.verbatim} is intended.

Value

Function Coverscale returns an object of class "Coverscale".

Method coverscale modifies a Vegsoup*.

Author(s)

Roland Kaiser

References

There are many textbooks dealing with coverscales. A recent treatment is found in:

Peet, R.K. & Roberts D.W. (2013). Classification of natural and semi-natural vegetation. In Vegetation Ecology (van der Maarel, E. & Franklin, J. eds). Wiley-Blackwell.

Currall, J. (1987). A transformation of the Domin scale. Vegetatio, 72(2):81-87.

Pfadenhauer, J., Poschlod, P., and Buchwald, R. (1986). Überlegungen zu einem Konzept geobotanischer Dauerbeobachtungsflächen für Bayern, Teil I. Berichte der ANL, 10:41-60.

See Also

Coverscale-class, BraunBlanquetReduce, Vegsoup in package vegsoup, tv.coverperc in package vegdata and coverscale in package vegan for the ancestor of this implementation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# show built in coverscales
Coverscale()

# test properties of coverscale objects
is.ordinal(Coverscale("ordinal"))
is.occurence(Coverscale("pa"))
is.continuous(Coverscale("percentage"))

# create coverscale from scratch
Coverscale("foo", letters[1:5], 1:5)

# real data
data(barmstein)
x <- barmstein

# print reports name of coverscale
x
coverscale(x)

# test properties of Vegsoup object
is.ordinal(x)
is.continuous(x)
is.occurence(x)


# use replace method to tarnsform covervalues
# lower 9 point to 7 point Braun-Blanquet scale
x1 <- x2 <- x

coverscale(x1) <- "braun.blanquet2"
coverscale(x2) <- Coverscale("braun.blanquet2")

identical(coverscale(x1), coverscale(x2))

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