Commit d55279ca authored by Andreas Tille's avatar Andreas Tille

Update upstream source from tag 'upstream/2.3-1'

Update to upstream version '2.3-1'
with Debian dir da66c4e11b0572bc967df614a64418090cb7fd70
parents ac36ad9d bc51a5cf
Package: prabclus
Title: Functions for Clustering of Presence-Absence, Abundance and
Multilocus Genetic Data
Version: 2.2-7
Date: 2019-01-16
Title: Functions for Clustering and Testing of Presence-Absence,
Abundance and Multilocus Genetic Data
Version: 2.3-1
Date: 2019-06-03
Author: Christian Hennig <christian.hennig@unibo.it>,
Bernhard Hausdorf <Hausdorf@zoologie.uni-hamburg.de>
Depends: R (>= 2.10), MASS, mclust
Suggests: spdep, maptools, foreign, mvtnorm
Suggests: spdep, spatialreg, bootstrap, maptools, foreign, mvtnorm
Description: Distance-based parametric bootstrap tests for clustering with
spatial neighborhood information. Some distance measures,
Clustering of presence-absence, abundance and multilocus genetical data
for species delimitation, nearest neighbor
based noise detection. Try package?prabclus for on overview.
based noise detection. Genetic distances between communities.
Tests whether various distance-based regressions
are equal. Try package?prabclus for on overview.
Maintainer: Christian Hennig <christian.hennig@unibo.it>
License: GPL
URL: http://www.homepages.ucl.ac.uk/~ucakche
URL: https://www.unibo.it/sitoweb/christian.hennig/en/
NeedsCompilation: no
Packaged: 2019-01-16 19:11:50 UTC; christian_hennig
Packaged: 2019-06-04 16:07:54 UTC; christian_hennig
Repository: CRAN
Date/Publication: 2019-01-17 13:40:07 UTC
Date/Publication: 2019-06-04 21:50:03 UTC
fee643e2a47e895b132f529bd6ce0361 *DESCRIPTION
eb4d6724c2dbd413f591f9744524ecd2 *NAMESPACE
d03f48ed45e3dd96af7bd3d8bddfd674 *DESCRIPTION
a6c42f446151f91f66b562ee021f6630 *NAMESPACE
9f070d14719b47e9d668a5f07ea95925 *R/NNclean.R
07436e115dbdc0ca7d8d96fce5620ea0 *R/abundfunctions.R
3948907f95adbd496a824f00e382521c *R/abundfunctions.R
115b45f8378c745df5e8b1d06309f1ef *R/alleletest.R
f2a6aea419b2c435341fe67e2f9824f7 *R/autoreg.R
9f6e91d410bdc0a380b06560f3073db4 *R/cluspop.nb.R
......@@ -25,13 +25,14 @@ dba3746883c2bd49790407231b7d90d3 *R/prabinit.R
76c7823f07cf686c8d4ce10c2bfd37c0 *R/print.prabclust.R
a52b46422e0d6501a16859a990ba70a3 *R/qkulczynski.R
738ce7d3b8c47baa980d95f1fad72e85 *R/randpop.nb.R
b5a594e1298617f4e5736fe150c5fe08 *data/kykladspecreg.rda
6ccf218080ad33aca67dd6d3c2eb8185 *R/reg2cluster2dist.R
015a488c2e16f29e138c3e4a5af0acb8 *data/kykladspecreg.rda
85ad90aabb8fdacde3d3cb6114778c60 *data/kykladspecreg.txt.gz
1af235643236f0ca7514ed6478b5d751 *data/nb.rda
fc8ed3d0ead932f0cc212075d8203f2b *data/siskiyou.rda
38eab42bac0c9bc085cce901c0cbc2cb *data/tetragonula.rda
aa645a06ca8c4305aa8557b61408526e *data/veronica.rda
86cec8e868a2ba8ff420bbd5000cec17 *data/waterdist.rda
322db871cc8f88e78fff36cee326cf32 *data/waterdist.rda
5b032d85fb132f2a8234d4ea932eecf0 *data/waterdist.txt.gz
dbde8ff731b3a2457c9d715157b30bc2 *inst/extdata/00Index.old
0f3c2be3ead69bf0c7786e38bfa6073e *inst/extdata/Franck04koord.txt
......@@ -46,58 +47,68 @@ ab3277f6d6b0acd80d3b7219f711ef67 *inst/extdata/nb.R
25c75544b86897f1a9b503dd303fdf13 *inst/extdata/siskiyou.R
8a3f57a89015f448ec4cafe45bf2722c *inst/extdata/tetragonula.R
739a823c0fd3dd05476bc86e38cdbd11 *inst/extdata/veronica.R
ea50e3d982dc0c92ea16b7b917ff7b08 *man/NNclean.Rd
0f66c45ffcefb7a917fe7d22fb9c9df3 *man/abundtest.Rd
4474833c02423fc1d5c0cc8691ce7343 *man/allele2zeroone.Rd
7f5ad5c089d884a1b2b65c6ef35bf339 *man/alleleconvert.Rd
22d6874b0577a9d609174638788a8d8b *man/alleledist.Rd
7ab7ac4424ad428fefde018ae2407dc7 *man/alleleinit.Rd
65a41f3ace73712c4c2fa4b7e80b217b *man/allelepaircomp.Rd
5488b7e83c72df28018f40f104d06c2d *man/autoconst.Rd
e711640852dc3ee7b0f045c3e5908c97 *man/build.charmatrix.Rd
ea79a6c3a6321a1530eb9c07b0254065 *man/build.ext.nblist.Rd
710659fbd387546b585226a32b918596 *man/build.nblist.Rd
12e30b591bc9eaa1f2782dc09ae011c7 *man/cluspop.nb.Rd
d653c5008330ff66a85dda3c253bd9b1 *man/comp.test.Rd
72302589f7eb073e2417ce7b8269b49a *man/concomp.Rd
b1a27be6f415841a8c3f924cc0452268 *man/conregmat.Rd
7055d79b9890ea376f44a6ccbcf1d42d *man/coord2dist.Rd
72c22a09c705a64a2db703f8cc800bd0 *man/crmatrix.Rd
20afdf5e051d736ee45f706aa2625207 *man/dicedist.Rd
cb6d84449a1f24804f797da846740ca9 *man/distratio.Rd
4ca0248d3aba01fd4e7d50f8ba71133e *man/geco.Rd
eaa9d39d0d089b0e706e08a4ebc58537 *man/geo2neighbor.Rd
cd53412faddf6b15e4bef3a607528655 *man/homogen.test.Rd
a3e68ae78eaf806fb3012cd2c7220d79 *man/hprabclust.Rd
8b5d0765a3b180ec9abe6d327b6193ae *man/incmatrix.Rd
a0ad902d8341ae5fca919193d29d2de6 *man/jaccard.Rd
cf8ca5f48fa5639a6158548545690219 *man/kulczynski.Rd
d3a1da650b72cac8e077125bf422c4e3 *man/NNclean.Rd
545c2cb38cbbf1ee107b1d1071991c54 *man/abundtest.Rd
88d86b9518a813257fc9beb3fd891423 *man/allele2zeroone.Rd
7cc83177c122d4bc9368d6fa02ed4d8f *man/alleleconvert.Rd
906a1b1fcc8483544226a6244d423bd1 *man/alleledist.Rd
1b428b27c95a1c21c2c9e4689554ac13 *man/alleleinit.Rd
f6a26990174b37ffecf9d409a7cfbc85 *man/allelepaircomp.Rd
1d2fe6fbfe6bef884b6cbb7eabc4f30c *man/autoconst.Rd
69028e6d4d2e2eb71fb757d186ccc6a9 *man/build.charmatrix.Rd
85a2b45550565f091c33b52842dd907a *man/build.ext.nblist.Rd
2d5d1f08ec99030818849cf529326b0e *man/build.nblist.Rd
1fccba18514eeb7b1f17befbcc524f98 *man/cluspop.nb.Rd
c5a1cdce1e4d5466d2acb57162c8118b *man/communities.Rd
c4dbd99dd48acf2a799f81087303a88d *man/communitydist.Rd
d10299b0feb9134febed0d65caa37a30 *man/comp.test.Rd
a6a232446d02453de77c9c3dd36c1486 *man/concomp.Rd
69adc2e4faa7a1395b44e87fdfd9bdad *man/conregmat.Rd
0c148c8201f4f970bdd25e626510fd78 *man/coord2dist.Rd
66f0795e811205c504eae9d257d66149 *man/crmatrix.Rd
187c8100af5efd3f85eb97d77305f13b *man/dicedist.Rd
7ce991d38f08e235c2a28374ba5e85b1 *man/distratio.Rd
146425f13f3a84396c5b8fdad1177846 *man/geco.Rd
0cda53642f19e423f89d319772bb8b72 *man/geo2neighbor.Rd
912cc0add380377bd42f1de2ae45c842 *man/homogen.test.Rd
2f0528f657cfecb7b1726383b6b97040 *man/hprabclust.Rd
2a85a6a2c049071a933dac69e0cfdaf7 *man/incmatrix.Rd
fbd2b7b086b511fa7c61bd19c50f01f3 *man/jaccard.Rd
307f1e788636ae16e5d36ab7eea087f0 *man/kulczynski.Rd
b0426a7dc7994631b8610896175b6245 *man/kykladspecreg.Rd
fa4e74ae8f0d4bdc27a04854431de890 *man/lcomponent.Rd
a4b8c35c9c2b23fcea83895fd42299ec *man/lociplots.Rd
b8e4c407f6b254c2aede8ad7b6b8e7a1 *man/nastats.Rd
317108916732b9a9a8bf271a14042039 *man/lcomponent.Rd
87f3e3d5c69bed5bb252e3250e84f99b *man/lociplots.Rd
8c2d53bd444f3ada0ba1e435d24ff774 *man/nastats.Rd
6956bcf68789a87ef4d440b7f75fbd0a *man/nb.Rd
21056c50fff6c0747f449354aee066ed *man/nbtest.Rd
e065dfa8ebb5166547281b0661da4556 *man/nn.Rd
95ca35cca509aabc8469fc5b2586eb81 *man/piecewiselin.Rd
e0aa50fcaa4d8e42c36a48055462ae78 *man/pop.sim.Rd
a041f6797d6401dead6042e34b6b2fb2 *man/prab.sarestimate.Rd
22144c1e12180f6e07999297de8139a4 *man/prabclus-package.Rd
cd5aa61b60f3080b28c9795ee6055b72 *man/prabclust.Rd
410aace4f8d660f896266a48403766d5 *man/prabinit.Rd
843bb6bd7c751db38c6c3b24e8b48736 *man/prabtest.Rd
92ae38e5561ffbf570f80c60e5cb397b *man/qkulczynski.Rd
6c5929e406e217481f7202ac4bb116a8 *man/randpop.nb.Rd
bcc948f36f1e17571b583f2aa2deac68 *man/regpop.sar.Rd
80d5bfb77123384b215b863a84ec1552 *man/nbtest.Rd
ebe1ca5aa119774166d0d4e8375522fd *man/nn.Rd
5d4f1012c81ff0a9140ae48db9109329 *man/phipt.Rd
fb5554227628bb0e9a236082846bf782 *man/piecewiselin.Rd
59202800e7562744a75ba5a35b78bf49 *man/plotdistreg.Rd
cf474caa41275a61a32b268399919dd3 *man/pop.sim.Rd
545d82d98e0b0f74fb41066c431f8f48 *man/prab.sarestimate.Rd
f450da61dbdb0b93b5f7c3b6c652cee4 *man/prabclus-package.Rd
255ed440fc22262876104ec5a073f4bc *man/prabclust.Rd
1c4a06af4707f1e6e1400ef92e81f842 *man/prabinit.Rd
9f2a93d680f75670e58dfc188d70a293 *man/prabtest.Rd
656bf1024a98626090cfe366f41f62bf *man/qkulczynski.Rd
2344f53ee527ba2dc6352063e8b29d4a *man/randpop.nb.Rd
560091097dc163b3046fc2373de2ce4b *man/regdist.Rd
16f516a2bd9bbce1d4c974f13b943cd7 *man/regdistbetween.Rd
81a5e73e14645c52410b7cafe2f06338 *man/regdistbetweenone.Rd
00cc5d315d89297567e965ad2663737d *man/regdistdiff.Rd
ae1e03954ef18716280ba38fc12c1cad *man/regdistdiffone.Rd
fcbd0e6b03df4612fe175c36b713af4b *man/regeqdist.Rd
6ebb0a20a1e079f0acc2294dd2246a6d *man/regpop.sar.Rd
bae29f63520bd1e713bc977a5697dc25 *man/siskiyou.Rd
ab1d917e340826858cc374ad61314c78 *man/specgroups.Rd
4569d9cc4df41e739d0b51dbf7b54d62 *man/stressvals.Rd
ff241faddaf422e30ad7b15abdc2857c *man/specgroups.Rd
b44570ec29241a8324ca81704ea7ba4a *man/stressvals.Rd
5f8ca0973829986561a78db65466fcbd *man/tetragonula.Rd
4a668b0423d5421223f6c3a0f84130ed *man/toprab.Rd
8a31c48615c2430a0127f3247b9fd440 *man/unbuild.charmatrix.Rd
e9dbfd86fc5261ef16e4e4ae0592399c *man/toprab.Rd
53c6f2a1ffe7daba7ea7951c969f458d *man/unbuild.charmatrix.Rd
eba2e1723307f7fa13789b8fc95e788a *man/veronica.Rd
c366a0dca80ff66e1188226a3c123d92 *man/waterdist.Rd
09e8e2c2376541fb04e4d915f4e3276d *tests/Examples/prabclus-Ex.Rout.save
60b90340041a17d3a9807c2c817310cb *tests/Examples/prabclus-Ex.Rout.save
4a311cd019aaf9e2ba7b6dbdb58dc3c8 *tests/donttestexamples.R
e4ebc8eb38def27e8c7ad3afe3c0f4a3 *tests/prabclustests.R
e59de050f3062c4c5ff726763bbe4693 *tests/prabclustests.Rout.save
b5b7dbd0d92862b5a0a8c8c631c450b9 *tests/prabclustests.Rout.save
......@@ -19,11 +19,13 @@ S3method(print, nnclean)
S3method(print, prab)
S3method(print, prabclust)
S3method(print, summary.prabtest)
S3method(print, regdistbetween)
S3method(print, regeqdist)
S3method(summary, prabtest)
importFrom("grDevices", "grey")
importFrom("graphics", "abline", "box", "hist", "lines", "plot")
importFrom("graphics", "abline", "box", "hist", "lines", "plot", "points")
importFrom("stats", "as.dist", "chisq.test", "cmdscale", "coef",
"cutree", "dist", "hclust", "lm", "mad", "median", "pnorm",
"ppois", "rnorm", "runif")
"ppois", "rnorm", "runif", "model.matrix", "pt", "sd", "var")
importFrom("utils", "read.table", "write.table")
......@@ -250,7 +250,7 @@ prab.sarestimate <- function(abmat, prab01=NULL,sarmethod="eigen",
if (sar){
nblistw <- build.nblist(abmat,prab01=prab01,style=weightstyle)
# print("errorsarlm")
abundlm <- spdep::errorsarlm(logabund~region+species,data=abundreg,
abundlm <- spatialreg::errorsarlm(logabund~region+species,data=abundreg,
listw=nblistw,quiet=quiet,zero.policy=TRUE,
method=sarmethod)
interc <- coef(abundlm)[2] # was 1
......
This diff is collapsed.
No preview for this file type
No preview for this file type
......@@ -63,8 +63,8 @@ Removal for Estimating Features in Spatial Point Processes,
\emph{Journal of the American Statistical Association}, 93, 577-584.
}
\author{R-port by Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche},\cr
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en},\cr
original Splus package by S. Byers and A. E. Raftery.
}
......
......@@ -188,8 +188,8 @@ tests for clustering of species ranges. \emph{Computational Statistics
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
......
......@@ -21,8 +21,8 @@
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\examples{
data(tetragonula)
......
......@@ -9,7 +9,8 @@
\code{"structurama"} and \code{"prabclus"}. \code{"genepop"}
is a version of the format
used by the package GENEPOP (Rousset, 2008), \code{"structure"} is a version
of what is used by STRUCTURE (Pritchard et al., 2000), \code{"structurama"}
of what is used by STRUCTURE (Pritchard et al., 2000), another one is
\code{"structureb"}. \code{"structurama"}
is a version of what is used by STRUCTURAMA (Huelsenbeck and
Andolfatto, 2007) and \code{"prabclus"} is required by the function
\code{\link{alleleinit}} in the present package.
......@@ -20,7 +21,7 @@
alength=3,orig.nachar="000",new.nachar="-",
rows.are.individuals=TRUE, firstcolname=FALSE,
aletters=intToUtf8(c(65:90,97:122),multiple=TRUE),
outfile=NULL)
outfile=NULL,skip=0)
}
%- maybe also `usage' for other objects documented here.
\arguments{
......@@ -28,8 +29,8 @@
\code{file} and \code{strmatrix} needs to be specified.}
\item{strmatrix}{matrix or data frame of strings, see details. One of
\code{file} and \code{strmatrix} needs to be specified.}
\item{format.in}{string. One of \code{"genepop"} or
\code{"structure"}, see details.}
\item{format.in}{string. One of \code{"genepop"},
\code{"structure"}, or \code{"structureb"}, see details.}
\item{format.out}{string. One of \code{"structurama"} or
\code{"prabclus"}, see details.}
\item{alength}{integer. If \code{format.in="genepop"}, length of code
......@@ -47,7 +48,9 @@
dataset).}
\item{outfile}{string. If specified, the output matrix (omitting
quotes) is written to a file of this name (including row names if
\code{fistcolname==TRUE}).}
\code{fistcolname==TRUE}).}
\item{skip}{number of rows to be skipped when reading data from a
file (\code{skip}-argument of \code{\link{read.table}}).}
}
\details{
The formats are as follows (described is the format within R, i.e.,
......@@ -65,6 +68,11 @@
Two rows correspond to each inidividual, the first row containing
the first alleles in all loci and the second row containing the
second ones.}
\item{structureb}{Alleles are coded by strings of arbitrary length.
One row corresponds to each inidividual, containing first and
second alleles in all loci (first and second allele of first locus, first
and second allele of second locus etc.). This starts in the third
row (first two have locus names and other information).}
\item{structurama}{Alleles are coded by strings of arbitrary
length. the two alleles in each locus are written with brackets
around them and a comma in between, so \code{"258260"} in
......@@ -99,8 +107,8 @@
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
\code{\link{alleleinit}}
......
......@@ -37,8 +37,8 @@
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
%- \code{\link{chorddist}},\code{\link{neidist}},
......
......@@ -114,8 +114,8 @@ alleleinit(file = NULL, allelematrix=NULL,
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
\code{\link{alleleconvert}}, \code{\link{alleledist}},
......
......@@ -27,8 +27,8 @@
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
\code{\link{alleledist}}
......
......@@ -93,8 +93,8 @@ tests for clustering of species ranges. \emph{Computational Statistics
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
\code{\link{randpop.nb}}, \code{\link{prabinit}}, \code{\link{con.comp}}
......
......@@ -30,8 +30,8 @@
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{\code{\link{alleleinit}}, \code{\link{unbuild.charmatrix}}}
......
......@@ -28,8 +28,8 @@
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{\code{\link{alleleinit}}}
......
......@@ -33,8 +33,8 @@ build.nblist(prabobj,prab01=NULL,style="C")
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
\code{\link[spdep]{nb2listw}} (which is called)
......
......@@ -78,8 +78,8 @@ tests for clustering of species ranges. \emph{Computational Statistics
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
\code{\link{randpop.nb}},
......
\name{communities}
\alias{communities}
%- Also NEED an `\alias' for EACH other topic documented here.
\title{Construct communities from individuals}
\description{
Construct communities from individuals using geographical distance and
hierarchical clustering. Communities are clusters of geographically
close individuals, formed by \code{\link{hclust}} with specified
distance cutoff.
}
\usage{
communities(geodist,grouping=NULL,
cutoff=1e-5,method="single")
}
%- maybe also `usage' for other objects documented here.
\arguments{
\item{geodist}{\code{dist}-object or matrix of geographical distances
between individuals.}
\item{grouping}{something that can be coerced into a factor. Different
groups indicated by \code{grouping} cannot be together in the same
community. (If \code{NULL}, there is no constraint.)}
\item{cutoff}{numeric; clustering distance cutoff value, passed on as
parameter \code{h} to \code{cutree}. Note that if this is smaller
than the smallest nonzero geographical distance, communities will be
all sets of individuals that have zero geographical distance to each
other.}
\item{method}{\code{method}-parameter for \code{\link{hclust}}.}
}
\value{
Vector of community memberships for the individuals (integer numbers
from 1 to the number of communities without interruption.
}
\author{Christian Hennig
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
\code{\link{communitydist}}
}
\examples{
data(veronica)
ver.geo <- coord2dist(coordmatrix=veronica.coord[1:90,],file.format="decimal2")
species <-c(rep(1,64),rep(2,17),rep(3,9))
communities(ver.geo,species)
}
\keyword{spatial}% __ONLY ONE__ keyword per line
\name{communitydist}
\alias{communitydist}
%- Also NEED an `\alias' for EACH other topic documented here.
\title{Distances between communities}
\description{
Constructs distances between communities: chord- (Cavalli-Sforza and
Edwards, 1967), phiPT/phiST (Peakall and Smouse, 2012, Meirmans,
2006),
three versions of the shared allele distance between communities,
and geographical distance between communities.
}
\usage{
communitydist(alleleobj,comvector="auto",distance="chord",
compute.geodist=TRUE,out.dist=FALSE,
grouping=NULL,geodist=NA,diploid=TRUE,
phiptna=NA,...)
}
%- maybe also `usage' for other objects documented here.
\arguments{
\item{alleleobj}{if \code{diploid=TRUE}, an object of class
\code{alleleobject} as produced by
function \code{\link[prabclus]{alleleinit}}. This has the required
information on the individuals that are grouped into communities. In
case \code{diploid=FALSE}, a list that needs to have components
\code{n.variables} (number of loci), \code{alevels} (vector of
allele names, see \code{\link{alleleinit}}) and
\code{charmatrix} (matrix of characters with one row for every
individual and one column for every locus giving the alleles; see
examples below for how this can be constructed for a
\code{prabobject} with presence-absence data).}
\item{comvector}{either a vector of integers indicating to which
community an individual belongs (these need to be numbered from 1 to
a maximum number without interruption), or \code{"auto"}, which
indicates that communities are automatically generated by the
\code{\link{communities}}-function.}
\item{distance}{one of \code{"chord"}, \code{"phipt"},
\code{"shared.average"}, \code{"shared.chakraborty"},
\code{"shared.problist"}. See Details.}
\item{compute.geodist}{logical, indicating whether geographical
distances between communities should be generated.}
\item{out.dist}{logical, indicating whether \code{dist}-objects are
given out or rather distance matrices.}
\item{grouping}{something that can be coerced into a factor, for
passing on to \code{\link{communities}} in case that
\code{comvector=="auto"}. This implies that individuals in different
groups indicated by \code{grouping} cannot be together in the same
community. Furthermore (also if \code{comvector} is something
else), a vector of groups of communities will be computed, see
output component \code{comgroup}. In any case individuals in
different groups are not allowed to be in the same community.}
\item{geodist}{matrix or \code{dist}-object providing geographical
distances between individuals. Required if
\code{compute.geodist==TRUE} or \code{comvector=="auto"}.}
\item{diploid}{logical, indicating whether loci are diploid, see
\code{alleleobj}.}
\item{phiptna}{if \code{distance="phipt"}, value to be given out as
phiPT-distance in case that
the original definition amounts to 0/0 (particularly if communities
have just one member).}
\item{...}{optional arguments to be passed on to \code{\link{communities}}.}
}
\details{
All genetic distances between communities are based on the information
given in \code{alleleobj}; either on the alleles directly or on a genetic
distance (\code{distmat}-component, see \code{\link{alleleinit}}).
The possible genetic distance measures between communities are as follows:
\itemize{
\item \code{"chord"}: chord-distance (Cavalli-Sforza and Edwards,
1967)
\item \code{"phipt"}: phiPT-distance implemented according to
Peakall and Smouse, 2012. This also appears in the literature under
the name phiST (Meirmans, 2006, although the definition there is
incomplete and we are not sure whether this is identical).
\item \code{"shared.average"}: average of between-community genetic
distances.
\item \code{"shared.chakraborty"}: between-community shared allele
distance according to Chakraborty and Jin (1993).
\item \code{"shared.problist"}: this implements the shared allele
distance (Bowcock et al., 1994) for individuals directly for
communities (one minus proportion of alleles shared by two
communities averaged over loci).
}
}
\value{
list with components
\item{comvector}{integer vector of length of the number of
individuals, indicating their community membership.}
\item{chorddist}{chord-distances between communities according to
Cavalli-Sforza and Edwards (1967); their original proposal for
aggregating different loci is used. Parameter \code{out.dist}
determines whether this is a \code{dist}-object or a matrix.}
\item{cgeodist}{if \code{compute.geodist}, geographical distance
between communities defined as average distance of all pairs of
individuals belonging to different ones of the two communities between
which the distance is computed. Parameter \code{out.dist}
determines whether this is a \code{dist}-object or a matrix.}
\item{comgroup}{vector of length of the number of communities. If
\code{grouping} was provided, this is a vector giving the group
memberships of all communities, otherwise it is a vector of 1s.}
}
\references{
Bowcock, A. M., Ruiz-Linares, A., Tomfohrde, J., Minch, E., Kidd, J. R.,
Cavalli-Sforza, L. L. (1994) High resolution of human evolutionary
trees with polymorphic microsatellites. \emph{Nature} 368, 455-457.
Cavalli-Sforza, L. L. and Edwards, A. W. F. (1967) Phylogenetic
Analysis - Models and Estimation Procedures. \emph{The American Journal of
Human Genetics} 19, 233-257.
Chakraborty, R. and Jin, L. (1993) Determination of relatedness between
individuals using DNA fingerprinting. \emph{Human Biology} 65, 875-895.
Meirmans, P. G. (2006) Using the AMOVA framework to estimate a
standardized genetic differentiation measure. \emph{Evolution} 60, 2399-2402.
Peakall, R. and Smouse P.E. (2012) GenAlEx Tutorial 2.
\url{https://biology-assets.anu.edu.au/GenAlEx/Tutorials.html}
}
\author{Christian Hennig
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
\code{\link{communities}}; refer to \code{\link{phipt}} for
computation of distances between specific pairs of communities.
\code{\link{diploidcomlist}} produces relative frequencies for all
alles of all loci in all communities (on which the chord- and the
\code{"shared.problist"}-distances are based).
}
\examples{
options(digits=4)
data(tetragonula)
tnb <-
coord2dist(coordmatrix=tetragonula.coord[83:120,],cut=50,
file.format="decimal2",neighbors=TRUE)
ta <- alleleconvert(strmatrix=tetragonula[83:120,])
tai <- alleleinit(allelematrix=ta,neighborhood=tnb$nblist)
tetraspec <- c(rep(1,11),rep(2,13),rep(3,14))
tetracoms <-
c(rep(1:3,each=3),4,5,rep(6:11,each=2),12,rep(13:19,each=2))
communitydist(tai,comvector=tetracoms,distance="chord",
geodist=tnb$distmatrix,grouping=tetraspec)
communitydist(tai,comvector=tetracoms,distance="phipt",
geodist=tnb$distmatrix,grouping=tetraspec,compute.geodist=FALSE)
communitydist(tai,comvector=tetracoms,distance="shared.average",
geodist=tnb$distmatrix,grouping=tetraspec,compute.geodist=FALSE)
communitydist(tai,comvector=tetracoms,distance="shared.chakraborty",
geodist=tnb$distmatrix,grouping=tetraspec,compute.geodist=FALSE)
communitydist(tai,comvector=tetracoms,distance="shared.problist",
geodist=tnb$distmatrix,grouping=tetraspec,compute.geodist=FALSE)
}
\keyword{spatial}% __ONLY ONE__ keyword per line
\keyword{multivariate}% __ONLY ONE__ keyword per line
......@@ -28,8 +28,8 @@ Hausdorf, B. and Hennig, C. (2003) Biotic Element Analysis in
Biogeography. \emph{Systematic Biology} 52, 717-723.
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
......
......@@ -29,8 +29,8 @@ con.comp(comat)
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
......
......@@ -27,8 +27,8 @@ con.regmat(regmat, neighbors, count = FALSE)
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\note{Designed for use in \code{prabtest}.}
......
......@@ -71,8 +71,8 @@
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
\code{\link{geo2neighbor}}
......
......@@ -25,8 +25,8 @@ crmatrix(x,xc,percentages=FALSE)
A clusters time regions matrix as explained above.
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}
}
\examples{
......
......@@ -31,8 +31,8 @@
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
\code{\link{kulczynski}},\code{\link{jaccard}}
......
......@@ -34,8 +34,8 @@ tests for clustering of species ranges.
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{\code{\link{prabtest}}}
......
......@@ -56,8 +56,8 @@ geco(regmat,geodist=as.dist(matrix(as.integer(!diag(nrow(regmat))))),
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
\code{\link{kulczynski}}
......
......@@ -21,8 +21,8 @@ geo2neighbor(geodist,cut=0.1*max(geodist))
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\examples{
data(waterdist)
......
......@@ -54,8 +54,8 @@ homogen.test(distmat, ne = ncol(distmat), testdist = "erdos")
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{\code{\link{prabtest}}}
......
......@@ -75,8 +75,8 @@ method="average", nnout=2, mdsplot=TRUE, mdsmethod="classical")
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
\seealso{
\code{\link{hclust}}, \code{\link{cutree}},
......
......@@ -29,8 +29,8 @@ Pleistocene glacial refuges. \emph{Oecologia} 135, 102-109.
}
\author{Christian Hennig
\email{chrish@stats.ucl.ac.uk}
\url{http://www.homepages.ucl.ac.uk/~ucakche}}
\email{christian.hennig@unibo.it}
\url{https://www.unibo.it/sitoweb/christian.hennig/en}}
......
......@@ -32,8 +32,8 @@ jaccard(regmat)
}
\author{Christian Hennig