head {vegsoup} | R Documentation |
Returns the first or last parts of the species matrix.
## S4 method for signature 'Vegsoup' head(x, n = 6L, choice, typeof, ...) ## S4 method for signature 'VegsoupPartition' head(x, n = 6L, choice, typeof, ...) ## S4 method for signature 'Vegsoup' tail(x, n = 6L, choice, typeof, ...)
x |
An object inheriting from class |
n |
A single integer. If positive, size for the resulting object. If negative,
all but the n last/first number of elements of x. defaults to |
choice |
Display the first rows of the species matrix ( |
typeof |
If choice is “species” of which mode should the returned matrix be
reported (see |
... |
Passed to functions. |
An object like as.matrix(x)
but generally smaller.
signature(obj = "Vegsoup")
head()
(tail()
) returns the first (last) n
rows of
the community matrix when choice = "species"
and the
n
rows of the sites data frame.
signature(obj = "VegsoupPartition")
If n != 6L
the method prints the typal
(typal
) sample for each partition, with the number of rows
equaling getK(x)
. If n
is left as the default the
behaviour is the same as defined for class Vegsoup
.
Call the method with named arguments ('choice'
respectively
'typeof'
). See ‘Examples’.
Roland Kaiser
as.matrix
and typal
in package vegsoup
head
and tail
in package utils.
require(vegsoup) data(windsfeld) x <- windsfeld # print sites or species head(x, choice = "sites") head(x, choice = "sp") # choice can abbreviated head(x, "si", n = 3) tail(x, choice = "sp", typeof = "character", n = 2) head(VegsoupPartition(x, k = 2))