prabinit
converts a matrix into an object
of class prab
(presence-absence). The matrix may be read from a
file or an R-object. It may be a 0-1 matrix or a matrix with
non-negative entries (usually abundances).
print.prab
is a print method for such
objects.
Documentation here is in terms of biotic elements analysis (species are to be clustered). For species delimitation with dominant markers, see Hausdorf and Hennig (2010), individuals take the role of species and loci take the role of regions.
prabinit(file = NULL, prabmatrix = NULL, rows.are.species = TRUE,
neighborhood = "none", nbbetweenregions=TRUE, geodist=NULL, gtf=0.1,
distance = "kulczynski", toprab = FALSE, toprabp
= 0.05, outc = 5.2)# S3 method for prab
print(x, ...)
prabinit
produces
an object of class prab
, which is a list with components
distance matrix between species.
abundance or presence/absence matrix (if presence/absence, the entries are logical). Rows are regions, columns are species.
neighborhood list, see above.
vector of the number of regions occupied by a species.
vector of the number of species present in a region.
number of species (in the prab
-object, see
nonzero
).
number of regions.
string denoting the chosen distance measure.
non-negative matrix. see above.
numeric. see above.
TRUE
, if there is a specified neighborhood
structure.
logical vector. The length is the number of species
in the original file/matrix. If FALSE
, the corresponding species
had only zero entries and was therefore absent. Note that these species
are not included in any other component of a prab
object, i.e.,
n.species
is the number of TRUE
-entries in
nonzero
.
see above.
string. non-negative matrix ASCII file (such as example dataset
kykladspecreg.dat
) from which the
matrix is read by read.table
. The usual interpretation is
that it is a species-by-regions matrix of species presences/absences
(0-1 matrix) or abundances.
matrix with non-negative entries. Either file
or prabmatrix
should be NA
.
logical. If TRUE
, rows are interpreted
as species and columns are interpreted as regions. In this case,
rows and columns are interchanged by prabinit
.
A string or a list with a component for
every region. The
components are vectors of integers indicating
neighboring regions. A region without neighbors (e.g., an island)
should be assigned a vector numeric(0)
. If neighborhood
is a filename, it is attempted to read such a list from a file,
where every row should correspond to one region (such as example
dataset nb.dat
). If
neighborhood="none"
, all neighborhoods are set to
numeric(0)
. The neighborhood can be tested by
nbtest
for consistency.
logical. If TRUE
, the neighborhood is
defined between regions as explained above. Otherwise it is defined
between species (or individuals, if this is used for species
delimitation).
matrix of non-negative reals. Geographical distances
between regions. Only used if distance="geco"
.
tuning constant for geco-distance if distance="geco"
,
see geco
.
"kulczynski"
, "jaccard"
, "geco"
,
"qkulczynski"
, "logkulczynski"
(this calls function
qkulczynski
with log.distance=TRUE
), "dice"
, or
"none"
. The distance measure
between species to compute by prabinit
.
logical. If TRUE
, a presence-absence matrix is
computed from the non-negative input matrix. "Absence", i.e., the
entry 0, is chosen if the original entry is 0, or the original entry
is smaller than or equal to toprabp
times the
sum of entries in the
corresponding region, and log(original entry) is considered to be a
lower outlier compared with the other entries of the corresponding
species (see outc
). "Presence", i.e., the entry 1, thus
means that the original
entry is non-negligible w.r.t. the species or w.r.t. the region.
numerical between 0 and 1, see toprab
.
numerical. Tuning constant for the outlier identification
associated with toprab=TRUE
. An entry smaller than or equal to
outc*mad
times the median is considered as a lower outlier.
object of class prab
.
necessary for print method.
Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en
Species that are absent in all regions are omitted.
Hausdorf, B. and Hennig, C. (2010) Species Delimitation Using Dominant and Codominant Multilocus Markers. Systematic Biology, 59, 491-503.
read.table
, jaccard
,
kulczynski
, geco
,
qkulczynski
, nbtest
,
alleleinit
# If you want to use your own ASCII data files, use
# x <- prabinit(file="path/prabmatrixfile",
# neighborhood="path/neighborhoodfile")
data(kykladspecreg)
data(nb)
prabinit(prabmatrix=kykladspecreg, neighborhood=nb)
Run the code above in your browser using DataLab