Vegsoup-class: Class Vegsoup

Description Objects from the Class Slots Methods Note Author(s) See Also Examples

Description

This is the foundation class of all Vegsoup* objects.

Objects from the Class

Objects can be created by calls of the form new("Vegsoup", ...). The user is encouraged to use the creator function Vegsoup.

Slots

species:

Object of class Species, the species data in long format.

sites:

Object of class data.frame, the sites data in wide format, developed from class Sites in long format.

taxonomy:

Object of class Taxonomy, the taxonomic reference list.

coverscale:

Object of class Coverscale, the description of the cover scale. See Coverscale for details.

decostand:

character, the method for decostand in vegan. Takes effect if as.matrix or as.dist is called. The slot 'decostand' is in fact of class decostand, this class is not exposed to the user and hence not documented.

dist:

character, giving a method for vegdist. Takes effect in calls or dispatch of as.dist.

layers:

character, containing the (vegetation) layers the object is structured by. Order matters.

group:

integer, a vector of a-priori group assignments.

sp.points:

Object of class SpatialPointsDataFrame defined in package sp. See also SpatialPoints

sp.polygons:

Object of class SpatialPolygonsDataFrame. See also SpatialPolygons.

Methods

Classes VegsoupOptimstride, VegsoupPartition and "VegsoupPartitionFidelity" all contain and directly extend class Vegsoup. The methods presented in the following sections apply to all these classes.

1) Dimensions of the object (species matrix).

dim

signature(x = "Vegsoup"): returns matrix dimensions (see above) giving the number of plots and (pseudo-)species.

ncol

signature(x = "Vegsoup"): the number of (pseudo-)species.

nrow

signature(x = "Vegsoup"): the number of plots.

ncell

signature(x = "Vegsoup"): the number of cells in the species matrix.

MatrixFill

signature(obj = "Vegsoup"): the percentage of presences in the species matrix.

2) Layer structure.

layer

signature(obj = "Vegsoup"): returns the layer for each species observation.

layers

signature(obj = "Vegsoup"): modifies an object's layer structure by suppling a layer combination rule as a "character" vector 'collapse'.

layers<-

signature(obj = "Vegsoup"): modifies the order of layers. This has effects on as.matrix and similar.

3) Cover scale.

coverscale

signature(obj = "Vegsoup"): returns the cover scale.

coverscale<-

signature(obj = "Vegsoup", value = "character"): sets the coverscale by suppling a name as recognized by the class creator function Coverscale. signature(obj = "Vegsoup", value = "Coverscale"): sets the coverscale by suppling a "Coverscale" object.

BraunBlanquetReduce

signature(obj = "Vegsoup"): reduce 9 point Braun-Blanquet scale to 7 point.

4) Standardization methods.

decostand

signature(obj = "Vegsoup"): returns the standardization method active for an object.

decostand<-

signature(obj = "Vegsoup", value = "character"): sets the standardization method active for an object. Note, values of slot 'decostand' have effect in as.matrix and similar matrix methods. signature(obj = "Vegsoup", value = "NULL"): reset/remove the standardization for an object by setting the value to NULL.

5) Dissimilarity/distance index.

vegdist

signature(x = "Vegsoup"): returns the dissimilarity/distance index set for an object.

vegdist<-

signature(x = "Vegsoup", value = "character"): set a distance measure for an object.

distconnected

signature(x = "Vegsoup"): connectedness of Dissimilarities.

6) Retrieve indices to species matrix.

indices

signature(x = "Vegsoup"): returns the locations (row and column pointers) and values of all nonzero entries in a species matrix (see as.matrix method and alike below).

as.vector

signature(x = "Vegsoup", mode = "missing"): is a shortcut to as.vector(as.matrix(x, typeof = mode), mode). Note, here the 'mode' argument has the meaning of the base R function and specifies the storage mode of the returned vector.

Together, indices and as.vector can be used to create a species matrix. See as.matrix.

7) Retrieve species matrix. In fact there are several ways of how to obtain the species matrix from an Vegsoup* object and all are based on the logic of object coercion. There are methods focused on a specific storage mode, as well, as a generic as.matrix coercion method. The following section outlines even more general index methods.

as.character

signature(x = "Vegsoup"): returns a matrix of mode "character" with species abundances in the data set's original scale.

as.logical

signature(x = "Vegsoup"): returns a matrix of mode "numeric" with zeros coding for species absences and ones for presences.

as.numeric

signature(x = "Vegsoup"): returns a matrix of mode "numeric" with species abundances recoded according to coverscale(obj).

as.matrix

signature(x = "Vegsoup"): retrieves a species matrices like those outlined above by setting the typeof argument specifying the mode of the returned matrix; can be one of "character", "numeric" or "logical". Use the additional argument mode with all four methods to get matrix transpositions. See as.matrix.

8) Retrieve dissimilarity/distance matrix.

as.dist

signature(m = "Vegsoup"): compute a distance matrix as specified by vegdist(obj). See as.dist

getDistconnected

signature(obj = "Vegsoup"): tests if dissimilarities/distances are connected.

9) Retrieve class slots. Methods to access or replace the 'species', 'sites' or 'taxonomy' slots are:

species

signature(obj = "Vegsoup"): returns slot, on object of class Species.

species<-

signature(obj = "Vegsoup", value = "Species"): assigns object of class Species to an existing Vegsoup* object. See species<-. signature(obj = "Vegsoup", value = "SpeciesTaxonomy"): assigns object of class "SpeciesTaxonomy" to an existing Vegsoup* object. Not implemented yet! See SpeciesTaxonomy.

sites

signature(obj = "Vegsoup"): returns slot, an object of class "data.frame". Note, the sites slot of Vegsoup objects is of class data.frame not Sites.

Sites<-

signature(obj = "Vegsoup", value = "data.frame"): The value object for the replacement function needs to have rownames matching rownames(obj).

Taxonomy

signature(obj = "Vegsoup"): returns slot, an object of class "data.frame", equaling an object of class Taxonomy.

Taxonomy<-

signature(obj = "Vegsoup", value = "SpeciesTaxonomy"): assign object of class "SpeciesTaxonomy" to an existing Vegsoup* object. Not implemented yet! See SpeciesTaxonomy

Methods to access or replace the 'Spatial*' slots are:

SpatialPointsVegsoup

signature(obj = "Vegsoup"): returns object of class SpatialPointsDataFrame.

SpatialPolygonsVegsoup

signature(obj = "Vegsoup"): returns object of class SpatialPolygonsDataFrame.

apriori

signature(obj = "Vegsoup"): returns a vector of a-priori group assignments. If not defined an "integer" vector of length equal to nrow(obj).

10) Names and species abbreviations.

dimnames

signature(x = "Vegsoup"): dimnames of the species matrix. See dimnames.

rownames

signature(x = "Vegsoup"): rownames of the species matrix, as well as of the sites data frame.

colnames

signature(x = "Vegsoup"): the column names of the species "matrix". See abbr.layer.

names

signature(x = "Vegsoup"): the column names of the sites "data.frame".

names<-

signature(x = "Vegsoup", value = "character"):

abbr

signature(obj = "Vegsoup"): abbreviations used to encode species.

abbr.layer

signature(obj = "Vegsoup"): abbreviations used to encode (pseudo-)species (layer replicates).

splitAbbr

signature(obj = "Vegsoup"): returns a data.frame. See splitAbbr.

11) Extract and replace.

[

signature(x = "Vegsoup", i = "ANY", j = "ANY"): provides all common indexing operations allowed for class "matrix".

[<-

signature(x = "Vegsoup", i = "ANY", j = "missing"): allows assignments to slot 'sites' . Note, this does not affect the species matrix.

$

signature(x = "Vegsoup"): access columns of sites data by name.

$<-

signature(x = "Vegsoup"): assign columns of sites data by name.

12) Row and column aggregation.

colSums

signature(x = "Vegsoup"): returns colSums(as.logical(obj)), hence does not take species abundance/cover values into consideration.

rowSums

signature(x = "Vegsoup"): returns rowSums(as.logical(obj)), same as above but for rows.

colMeans

signature(x = "Vegsoup"): returns colMeans(as.numeric(obj)) of species abundance/cover values.

rowMeans

signature(x = "Vegsoup"): returns rowMeans(as.numeric(obj)).

richness

signature(obj = "Vegsoup"): Conceptually similar to the methods outlined above, but tailored to respect the layer structure of an object in a special way. See richness for details.

13) Reorder and sample.

seriation

signature(obj = "Vegsoup"): modifies order as to reflect a vegetation table.

sample

signature(x = "Vegsoup"): random samples and permutations.

14) Plotting methods.

plot

signature(x = "Vegsoup", y = "missing"): a simple descriptive plot of the data set.

coldiss

signature(obj = "Vegsoup"): plots of the dissimilarity matrix.

map

signature(obj = "Vegsoup"): plots a plain map.

15) Spatial methods.

coordinates

signature(obj = "Vegsoup"): returns the a "matrix" of coordinates. See coordinates.

elevation

signature(obj = "Vegsoup"): queries elevation for plot coordinates from the SRTM3 data set.

quicklook

signature(obj = "Vegsoup"): open a map in browser window.

16) Summary methods.

summary

signature(object = "Vegsoup"): prints an summary.

head

signature(x = "Vegsoup"): prints the top rows of the species matrix.

tail

signature(x = "Vegsoup"): prints the bottom rows of the species matrix.

taxalist

signature(obj = "Vegsoup"): returns a complete list of species with corresponding abbreviations.

17) Coerce methods.

coerce

signature(from = "Vegsoup", to = "dist"): same as as.dist(obj) (see above). signature(from = "Vegsoup", to = "list"): returns objects all of class "data.frame" from slots 'species', 'sites' and 'taxonomy'. signature(from = "Vegsoup", to = "matrix"): same as as.matrix(obj) (see above). signature(from = "Vegsoup", to = "data.frame"): returns objects all of class "data.frame". See as.data.frame. signature(from = "Vegsoup", to = "data.list"): returns objects all of class "data.list". See as.data.list. signature(from = "Vegsoup", to = "dsparseMatrix"): returns objects all of class "dsparseMatrix". See as.matrix. signature(from = "Vegsoup", to = "sparseMatrix"): returns objects all of class "sparseMatrix". See as.matrix.

18) Combine objects.

bind

signature(... = "Vegsoup"): combine/merge objects.

1) Output methods.

KML

signature(obj = "Vegsoup"): writes a KML file for visualization in Google Earth.

write.verbatim

signature(obj = "Vegsoup"): writes the species matrix including header information to a plain text file.

1) Miscellaneous.

Indpower

signature(obj = "Vegsoup"): congruence between indicator and target species.

compspec

signature(obj = "Vegsoup"): compositional indicator species analysis.

Note

Give notes!

Author(s)

Roland Kaiser

See Also

Species, Sites, Taxonomy, Vegsoup, instantsoup coenoflex

Examples

1
showClass("Vegsoup")

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