Description Usage Arguments Details Value Note Author(s) See Also Examples
reshapeSpecies
is a utility function for conversion of objects of
class "data.frame"
to class Species
. The format demands
cover values for layers to be given in separate columns. Such data structures
might be delivered by certain data bases or archives, or are available as
digitized field lists. shapeSpecies
performs the reverse operation on
objects of class Vegsoup*
. This might be useful for tabular presentation
of single relevées.
1 2 3 | reshapeSpecies(x, file, schema, sep = ";", dec = ",", verbose = FALSE)
shapeSpecies(obj)
|
x |
A data frame given in a particular structure. |
obj |
A |
file |
Path to a csv-file. |
schema |
Names of columns to be searched for. See ‘Details’. |
sep |
See |
dec |
See |
verbose |
Prints diagnostic messages. |
The current implementation for reshapeSpecies
support only a single
case. The values of schema
are seeked in the column names of
x
, respectively, file
to tabulate observations for layers.
The first element of schema
identifies plots, the second species
abbreviations or taxon names, and the remaining columns contain the
observations on a specific layer. Layer codes are assigned based on
names(x)
. See ‘Examples’.
shapeSpecies
reverts what is done by reshapeSpecies
. The
main purpose of that function is print a compact and more readable species
list including when there are more than one layer.
reshapeSpecies
returns an object of class
Species
.
shapeSpecies
returns an object of class
"data.frame"
.
shapeSpecies
will change the order of taxa based on
taxonomy(obj)
. The order of plots equals that of the input object.
The same is true for the order of layer columns.
Roland Kaiser
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # create dummy data
# only a single plot for demonstartion
require(vegsoup)
data(barmstein)
x <- barmstein
# for demonstration, first create format
spc <- shapeSpecies(x)
class(spc)
head(spc)
# then stack again
r <- reshapeSpecies(spc, schema = c("plot", "abbr", "hl", "sl", "ml"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.