Commit 57957eda authored by Andreas Tille's avatar Andreas Tille

New upstream version 2.2-7

parent a6536245
Package: prabclus
Title: Functions for Clustering of Presence-Absence, Abundance and
Multilocus Genetic Data
Version: 2.2-6
Date: 2015-01-14
Author: Christian Hennig <c.hennig@ucl.ac.uk>,
Version: 2.2-7
Date: 2019-01-16
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
......@@ -12,10 +12,10 @@ Description: Distance-based parametric bootstrap tests for clustering with
Clustering of presence-absence, abundance and multilocus genetical data
for species delimitation, nearest neighbor
based noise detection. Try package?prabclus for on overview.
Maintainer: Christian Hennig <c.hennig@ucl.ac.uk>
Maintainer: Christian Hennig <christian.hennig@unibo.it>
License: GPL
URL: http://www.homepages.ucl.ac.uk/~ucakche
Packaged: 2015-01-14 18:16:04 UTC; chrish
NeedsCompilation: no
Packaged: 2019-01-16 19:11:50 UTC; christian_hennig
Repository: CRAN
Date/Publication: 2015-01-14 22:49:24
Date/Publication: 2019-01-17 13:40:07 UTC
0a750f1de08c409ca729b05dca16878e *DESCRIPTION
a90e954c24f5e2d12f77bc865afbd330 *NAMESPACE
fee643e2a47e895b132f529bd6ce0361 *DESCRIPTION
eb4d6724c2dbd413f591f9744524ecd2 *NAMESPACE
9f070d14719b47e9d668a5f07ea95925 *R/NNclean.R
07436e115dbdc0ca7d8d96fce5620ea0 *R/abundfunctions.R
115b45f8378c745df5e8b1d06309f1ef *R/alleletest.R
......@@ -19,20 +19,19 @@ a0648af343d515b17ea643093a7fce6f *R/lcomponent.R
7d6dfeda66e615a3990bb7a8b2fda954 *R/newprabmatrix.R
26243bfd6071896f389235cc76e97d60 *R/nn.R
ca52f7676bebc47aae515c9d434f0c07 *R/pop.sim.R
64eaf3636eab62daa3ca086e07b26eb7 *R/prabclust.R
4c5ac3a51e45f4553d338e2418ae4e06 *R/prabclust.R
dba3746883c2bd49790407231b7d90d3 *R/prabinit.R
0d58d5839bc2d3877841762f9ccb6eb9 *R/print.prab.R
76c7823f07cf686c8d4ce10c2bfd37c0 *R/print.prabclust.R
a52b46422e0d6501a16859a990ba70a3 *R/qkulczynski.R
738ce7d3b8c47baa980d95f1fad72e85 *R/randpop.nb.R
f3650a649c680dbe2e0f4de1c9d0219d *README
0c19b3b2d075c6211df97f04505398cf *data/kykladspecreg.rda
b5a594e1298617f4e5736fe150c5fe08 *data/kykladspecreg.rda
85ad90aabb8fdacde3d3cb6114778c60 *data/kykladspecreg.txt.gz
1af235643236f0ca7514ed6478b5d751 *data/nb.rda
fc8ed3d0ead932f0cc212075d8203f2b *data/siskiyou.rda
38eab42bac0c9bc085cce901c0cbc2cb *data/tetragonula.rda
aa645a06ca8c4305aa8557b61408526e *data/veronica.rda
9fffc4771d7f653e0a9533c7ae4b2049 *data/waterdist.rda
86cec8e868a2ba8ff420bbd5000cec17 *data/waterdist.rda
5b032d85fb132f2a8234d4ea932eecf0 *data/waterdist.txt.gz
dbde8ff731b3a2457c9d715157b30bc2 *inst/extdata/00Index.old
0f3c2be3ead69bf0c7786e38bfa6073e *inst/extdata/Franck04koord.txt
......@@ -50,7 +49,7 @@ ab3277f6d6b0acd80d3b7219f711ef67 *inst/extdata/nb.R
ea50e3d982dc0c92ea16b7b917ff7b08 *man/NNclean.Rd
0f66c45ffcefb7a917fe7d22fb9c9df3 *man/abundtest.Rd
4474833c02423fc1d5c0cc8691ce7343 *man/allele2zeroone.Rd
2be794c8ae8a0dba03937dfa34691b3e *man/alleleconvert.Rd
7f5ad5c089d884a1b2b65c6ef35bf339 *man/alleleconvert.Rd
22d6874b0577a9d609174638788a8d8b *man/alleledist.Rd
7ab7ac4424ad428fefde018ae2407dc7 *man/alleleinit.Rd
65a41f3ace73712c4c2fa4b7e80b217b *man/allelepaircomp.Rd
......@@ -84,7 +83,7 @@ e065dfa8ebb5166547281b0661da4556 *man/nn.Rd
e0aa50fcaa4d8e42c36a48055462ae78 *man/pop.sim.Rd
a041f6797d6401dead6042e34b6b2fb2 *man/prab.sarestimate.Rd
22144c1e12180f6e07999297de8139a4 *man/prabclus-package.Rd
94170eb844e5a5bc4058a8834467a5a7 *man/prabclust.Rd
cd5aa61b60f3080b28c9795ee6055b72 *man/prabclust.Rd
410aace4f8d660f896266a48403766d5 *man/prabinit.Rd
843bb6bd7c751db38c6c3b24e8b48736 *man/prabtest.Rd
92ae38e5561ffbf570f80c60e5cb397b *man/qkulczynski.Rd
......@@ -93,12 +92,12 @@ bcc948f36f1e17571b583f2aa2deac68 *man/regpop.sar.Rd
bae29f63520bd1e713bc977a5697dc25 *man/siskiyou.Rd
ab1d917e340826858cc374ad61314c78 *man/specgroups.Rd
4569d9cc4df41e739d0b51dbf7b54d62 *man/stressvals.Rd
960bc558cad2527dbfe65c86cb410140 *man/tetragonula.Rd
5f8ca0973829986561a78db65466fcbd *man/tetragonula.Rd
4a668b0423d5421223f6c3a0f84130ed *man/toprab.Rd
8a31c48615c2430a0127f3247b9fd440 *man/unbuild.charmatrix.Rd
eba2e1723307f7fa13789b8fc95e788a *man/veronica.Rd
c366a0dca80ff66e1188226a3c123d92 *man/waterdist.Rd
7a870e89f0e585fd5fca4f20311a2717 *tests/Examples/prabclus-Ex.Rout.save
09e8e2c2376541fb04e4d915f4e3276d *tests/Examples/prabclus-Ex.Rout.save
4a311cd019aaf9e2ba7b6dbdb58dc3c8 *tests/donttestexamples.R
e4ebc8eb38def27e8c7ad3afe3c0f4a3 *tests/prabclustests.R
8c440cf7d044d5e5152d62236104ee17 *tests/prabclustests.Rout.save
e59de050f3062c4c5ff726763bbe4693 *tests/prabclustests.Rout.save
......@@ -9,3 +9,21 @@ import(
MASS,
mclust
)
# register
# print.alleleobject print.comprabclust print.nnclean print.prab
# print.prabclust print.summary.prabtest summary.prabtest
S3method(print, alleleobject)
S3method(print, comprabclust)
S3method(print, nnclean)
S3method(print, prab)
S3method(print, prabclust)
S3method(print, summary.prabtest)
S3method(summary, prabtest)
importFrom("grDevices", "grey")
importFrom("graphics", "abline", "box", "hist", "lines", "plot")
importFrom("stats", "as.dist", "chisq.test", "cmdscale", "coef",
"cutree", "dist", "hclust", "lm", "mad", "median", "pnorm",
"ppois", "rnorm", "runif")
importFrom("utils", "read.table", "write.table")
......@@ -130,18 +130,24 @@ prabclust <- function (prabobj, mdsmethod = "classical", mdsdim = 4,
if (!is.null(operm)) {
skem$classification[operm] <- skembest$classification
skem$z[operm, ] <- skembest$z
if (!is.null(attr(skembest, "initialization")$noise))
attr(skem, "initialization")$noise[operm] <- attr(skembest,
"initialization")$noise
if (!is.null(attr(skembest, "initialization")$noise)){
snoisevector <- (1:prabobj$n.species) %in% attr(skem, "initialization")$noise
sbnoisevector <- (1:prabobj$n.species) %in% attr(skembest, "initialization")$noise
snoisevector[operm] <- sbnoisevector
attr(skem, "initialization")$noise <- (1:prabobj$n.species)[snoisevector]
}
skembest <- skem
}
mdsr <- mds
mds[ospecies, ] <- mdsr
skem$classification[ospecies] <- skembest$classification
skem$z[ospecies, ] <- skembest$z
if (!is.null(attr(skembest, "initialization")$noise))
attr(skem, "initialization")$noise[ospecies] <- attr(skembest,
"initialization")$noise
if (!is.null(attr(skembest, "initialization")$noise)){
snoisevector <- (1:prabobj$n.species) %in% attr(skem, "initialization")$noise
sbnoisevector <- (1:prabobj$n.species) %in% attr(skembest, "initialization")$noise
snoisevector[ospecies] <- sbnoisevector
attr(skem, "initialization")$noise <- (1:prabobj$n.species)[snoisevector]
}
uclustering <- skem$classification
ncl <- max(uclustering)
nc <- ncl + 1
......
1. Put any C/Fortran code in src/
2. If you have compiled code, add a .First.lib() function in R/
to load the shared library
3. Edit the help file skeletons in man/.
4. Run R CMD build to create INDEX and data/00Index
5. (Optionally) edit INDEX and data/00Index
6. Run R CMD check to check the package
7. Run R CMD build to make the package file
Read "Writing R Extensions" for more information.
No preview for this file type
No preview for this file type
......@@ -8,7 +8,7 @@
function converts the formats \code{"genepop"} and \code{"structure"} into
\code{"structurama"} and \code{"prabclus"}. \code{"genepop"}
is a version of the format
used by the package GENEPOP (Rousset, 2010), \code{"structure"} is a version
used by the package GENEPOP (Rousset, 2008), \code{"structure"} is a version
of what is used by STRUCTURE (Pritchard et al., 2000), \code{"structurama"}
is a version of what is used by STRUCTURAMA (Huelsenbeck and
Andolfatto, 2007) and \code{"prabclus"} is required by the function
......@@ -91,8 +91,10 @@
population structure using multi-locus genotype data. \emph{Genetics}
155, 945-959.
Rousset, F. (2010) Genepop 4.0 for Windows and Linux.
\url{http://kimura.univ-montp2.fr/~rousset/Genepop.pdf}
Rousset, F. (2008) genepop'007: a complete re-implementation of the
genepop software for Windows and Linux. \emph{Molecular Ecology
Resources} 8, 103-106.
}
......
......@@ -26,10 +26,7 @@
\code{Heterotrigona_indoFO.txt} or \code{MartinezOrtega04AFLP.dat}.
\cr
\bold{Note:} \code{prabclust} calls the function
\code{\link[mclust]{mclustBIC}} in package mclust. Its use is
protected by a special license, see
\url{http://www.stat.washington.edu/mclust/license.txt}, particularly
point 6. An alternative is the use of \code{\link{hprabclust}}.
\code{\link[mclust]{mclustBIC}} in package mclust. An alternative is the use of \code{\link{hprabclust}}.
}
\usage{
......
......@@ -16,7 +16,7 @@
\item{tetragonula}{A data frame with 236 observations and 13 string
variables. Strings consist of six digits each. The
format is derived from the data format used by the software GENEPOP
(Rousset 2010). Alleles have a three digit code, so a value of
(Rousset 2008). Alleles have a three digit code, so a value of
\code{"258260"} on variable V10 means that on locus 10 the two alleles have
codes 258 and 260. \code{"000"} refers to missing values.}
\item{tetragonula.coord}{a 236*2 matrix. Coordinates of locations of
......@@ -31,8 +31,9 @@
(2004) Nest architecture and genetic differentiation in a species
complex of Australian stingless bees. \emph{Mol. Ecol.} 13, 2317-2331.
Rousset, F. (2010) Genepop 4.0 for Windows and Linux.
\url{http://kimura.univ-montp2.fr/~rousset/Genepop.pdf}
Rousset, F. (2008) genepop'007: a complete re-implementation of the
genepop software for Windows and Linux. \emph{Molecular Ecology
Resources} 8, 103-106.
}
\details{
Reads from example data file \code{Heterotrigona_indoFO.dat}.
......
R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
Copyright (C) 2014 The R Foundation for Statistical Computing
R Under development (unstable) (2019-01-14 r75992) -- "Unsuffered Consequences"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
......@@ -23,10 +23,11 @@ Type 'q()' to quit R.
> library('prabclus')
Loading required package: MASS
Loading required package: mclust
Package 'mclust' version 4.4
Package 'mclust' version 5.4.2
Type 'citation("mclust")' for citing this R package in publications.
>
> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
> base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv')
> cleanEx()
> nameEx("NNclean")
> ### * NNclean
......@@ -299,7 +300,7 @@ Type 'citation("mclust")' for citing this R package in publications.
> data(tetragonula)
> # This uses example data file Heterotrigona_indoFO.dat
> str(alleleconvert(strmatrix=tetragonula))
chr [1:236, 1:13] "NO" "EO" "NQ" "OO" "OO" "LN" "OO" "EP" ...
chr [1:236, 1:13] "NO" "EO" "NQ" "OO" "OO" "LN" "OO" "EP" "NO" "EO" "NN" ...
- attr(*, "alevels")= chr [1:28] "A" "B" "C" "D" ...
> strucmatrix <-
+ cbind(c("I1","I1","I2","I2","I3","I3"),
......@@ -703,7 +704,7 @@ Clustered species 10
replicates)
data: cl and spg
X-squared = 2.28, df = NA, p-value = 0.6889
X-squared = 2.3, df = NA, p-value = 0.7
>
>
......@@ -6267,9 +6268,10 @@ List of 13
>
> ### * <FOOTER>
> ###
> cleanEx()
> options(digits = 7L)
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
Time elapsed: 4.02 0.06 4.094 0 0
Time elapsed: 4.97 0.056 5.029 0 0
> grDevices::dev.off()
null device
1
......
R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
Copyright (C) 2014 The R Foundation for Statistical Computing
R Under development (unstable) (2019-01-14 r75992) -- "Unsuffered Consequences"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
......@@ -18,7 +18,7 @@ Type 'q()' to quit R.
> library(prabclus)
Loading required package: MASS
Loading required package: mclust
Package 'mclust' version 4.4
Package 'mclust' version 5.4.2
Type 'citation("mclust")' for citing this R package in publications.
> options(digits=4)
>
......@@ -119,6 +119,17 @@ between-species distance matrix of type jaccard .
> library(spdep)
Loading required package: sp
Loading required package: Matrix
Loading required package: spData
To access larger datasets in this package, install the spDataLarge
package with: `install.packages('spDataLarge',
repos='https://nowosad.github.io/drat/', type='source')`
Attaching package: 'spData'
The following object is masked _by_ '.GlobalEnv':
x
> data(siskiyou)
> x <- prabinit(prabmatrix=siskiyou, neighborhood=siskiyou.nb,
+ distance="logkulczynski")
......@@ -645,4 +656,4 @@ Log likelihood: -597
>
> proc.time()
user system elapsed
8.616 0.052 8.695
9.366 0.063 9.425
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment