Description Objects from the Class Slots Methods Author(s) See Also Examples
Data representation of taxonomic reference list.
Objects can be created by calls of the form new("Taxonomy", ...)
,
where ...
expands to slot 'data'. Using the taxonomy
method with appropriate objects is also fast and convenient
(see ‘Methods’).
abbr
contains unique abbreviations of a scientific latin name
that translate those of class Species
.
taxon
gives the full scientific latin name.
data
:Object of class "data.frame"
with at least
two columns named 'abbr'
and 'taxon'
.
signature(obj = "Taxonomy")
:
accessor function (slot "data").
signature(obj = "SpeciesTaxonomy")
:
accessor function for objects of class SpeciesTaxonomy
.
signature(obj = "data.frame")
:
promote data.frame
to object of class "Taxomomy"
.
signature(obj = "matrix")
:
promote matrix
to object of class "Taxomomy"
.
Note, obj
does not need to have dimnames
.
signature(obj = "character")
:
supply a file to be read by read.csv
and promote that object to
class Species
. Remember to pass appropriate arguments to
read.csv
that meet the specifications of your file.
signature(x = "Taxonomy")
:
the number of rows is the number of taxa.
signature(x = "Taxonomy")
:
Subset parts of an object. Note, indexing that will
evaluate to an object with less than two columns will fail,
due to the class inherent data model (see ‘Slots’).
signature(x = "Taxonomy")
:
bind
method to combine two or more objects. If there are any
duplicates in the 'abbr'
key column only one instance is kept,
the first one!
Roland Kaiser
SpeciesTaxonomy
and function SpeciesTaxonomy
,
Species
,
Sites
tax
in package vegdata
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | require(vegsoup)
data(barmstein)
x <- barmstein
# from demonstration extract from object
x <- taxonomy(taxonomy(x)) # returns object of class 'data.frame'
t <- new("Taxonomy", data = x)
# taxonomy method for class data.frame
( t <- taxonomy(x) )
# or matrix
( t <- taxonomy(as.matrix(x)) )
# get slot data from object
taxonomy(t) # returns object of class 'data.frame'
# combine objects
data(windsfeld)
x <- windsfeld
t2 <- taxonomy(x)
bind(t, t2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.