Skip to content

Commit

Permalink
version 1.7-0
Browse files Browse the repository at this point in the history
  • Loading branch information
dvrbts authored and cran-robot committed May 5, 2015
1 parent e08d76d commit a56af17
Show file tree
Hide file tree
Showing 81 changed files with 1,308 additions and 1,027 deletions.
11 changes: 6 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
Package: labdsv
Version: 1.6-1
Date: 2013-09-13
Version: 1.7-0
Date: 2015-05-04
Title: Ordination and Multivariate Analysis for Ecology
Author: David W. Roberts <droberts@montana.edu>
Maintainer: David W. Roberts <droberts@montana.edu>
Depends: R (>= 2.10), mgcv, MASS
Suggests: rgl, optpart
Imports: rgl, cluster
Suggests: optpart, fso
Description: A variety of ordination and community analyses
useful in analysis of data sets in community ecology.
Includes many of the common ordination methods, with
graphical routines to facilitate their interpretation,
as well as several novel analyses.
License: GPL (>= 2)
URL: http://ecology.msu.montana.edu/labdsv/R
Packaged: 2013-09-13 17:50:42 UTC; dvrbts
Packaged: 2015-05-04 22:05:02 UTC; dvrbts
NeedsCompilation: yes
Repository: CRAN
Date/Publication: 2013-09-13 22:20:43
Date/Publication: 2015-05-05 00:12:11
24 changes: 17 additions & 7 deletions INDEX
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
abuocc Abundance/Occurrence Graphical Analysis
brycesite Site Data for Bryce Canyon National Park
bryceveg Bryce Canyon Vegetation Data
confus Confusion Matrix
compspec Compositional Specificity Analysis
concov Constancy/Coverage Table
const Constancy Table
dematrify Dematrify Matrices or Data.Frames
dga Direct Gradient Analysis
disana Dissimilarity Analysis
dropplt Drop Samples with Missing Values
dropspc Drop Null Species from Taxon Data.Frames
dsvdis Dissimilarity Indices and Distance Measures
duarm Indicator Species Analysis Minimizing Partial
Occurrences
duleg Dufrene-Legendre Indicator Species Analysis
envrtest Environmental Distribution Test
euclidify Nearest Euclidean Space Representation of a
Dissimilarity Object
homoteneity Homoteneity Analysis
importance Importance Table
indspc Compositional Indicator Species Analysis
indval Dufrene-Legendre Indicator Species Analysis
isamic Indicator Species Analysis Minimizing Partial
Occurrences
labdsv.internal LabDSV Internal Funcctions
matrify Convert Three-column Database form to a Data.Frame
metrify Nearest Metric Space Representation of a
Dissimilarity Object
nmds Nonmetric Multidimensional Scaling
ordcomp Ordination to Dissimilarity Comparison
ordist Calculation of pair-wise distances in an ordination
orddist Calculation of pair-wise distances in an ordination
ordpart Ordination Partitioning
ordtaxa Re-Order Taxon and Site Data.Frames
ordtest Ordination Distribution Test
pca Principal Components Analysis
pco Principal Coordinates Analysis
Expand All @@ -30,7 +36,11 @@ plot.pca Plotting Routines For Principal Components
Ordinations
plot.pco Plotting Routines For Principal Coordinates
Ordinations
rndveg Randomize a Vegetation Data Frame
raretaxa Rare Taxa Analysis in Taxon Data.Frames
reconcile Reconcile Taxon and Site (Environment) Data.Frames
rnddist Create Random Distance Matrices
rdntaxa Randomize a Taxa Data.Frame for Null Model Tests
spcdisc Species Discrimination Analysis
thull Tensioned Hull Analysis
vegtab Vegetation Table
vegtrans Vegetation Transformation and Standardization
151 changes: 76 additions & 75 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,85 +1,86 @@
3d8477a8c9f1ba3ad1e4e1ce3a3a96de *DESCRIPTION
b19ce3a4f52df065c2c577fe181dcf2a *INDEX
8fb966472d87fab9d1323808ce8ea002 *NAMESPACE
ca8b205671d1b8735512edb6a9ed9420 *R/abuocc.R
bdefb6a9460cc8f60d60ccef75a4de94 *R/concov.R
e56804ff5961c13109ed2e96c3c9ed09 *R/const.R
d607faeb181a0964f58d0085b301858d *R/dematrify.R
ff2bf8ad80cef7e07971819c067cd518 *R/dga.R
241d7e41bcac3780895805252ae3e68b *R/disana.R
a624930c91e14e46b94a550c877ed9ad *R/drop.R
b6457b63c3decffd9811b53c0b2d128e *R/dsvdis.R
c0581f99d3f07bea3c1f790a495027aa *R/envrtest.R
cdcb53d3daeb4fbb9c0b0e6a61275610 *R/euclidify.R
d66c7fea0009a502540075ade585ca62 *R/homoteneity.R
4872f42a0d058317f3aa4a4122e8e5b4 *R/importance.R
f1acb885dd0bcf7588df2123ec7dafbf *R/indspc.R
765bc0271693f333669c1cd8a81c0703 *R/indval.R
1eba8d2a5d15f4aa9c4e8eb7f906d5f8 *R/isamic.R
baa8259c61d5935fb7906eb182c25931 *DESCRIPTION
b8dd8474b83dc221358ee57540e7c0ad *INDEX
9395bf65765c064e3cd272495d04098b *NAMESPACE
bc5ef1014bd63ec8cc7d562ad9e33c95 *R/abuocc.R
1176ca85e039bb742d9fa8513deb48e7 *R/clustify.R
e8993e4feb2dfd1b9e95c57863eada7f *R/compspec.R
a5fb9bfccb9a490e7c8dd8e8e777df86 *R/concov.R
0e340409cd15589b9821c94ba1d54e81 *R/const.R
5cdf0649b90a4da4e224a474b0fdb02b *R/dematrify.R
e7fdc3daf49e8b5b5ee315b6d3203d83 *R/dga.R
e5da1778a951c2bafbd8e3f280ff030e *R/disana.R
24d7dd07620cd744fc2d66efb3df3613 *R/drop.R
f04ad1612c9b38909371a9943149d9d7 *R/dsvdis.R
9d6a49dcb22e8c2bc216b4b854a1271e *R/envrtest.R
02e074e673215c06f676cabac87206a5 *R/euclidify.R
cbd42474481da99db4f8406638c07ccb *R/homoteneity.R
02508e78f7ecb9898c7cb4321d4ca9e5 *R/importance.R
9a94e197b5d53ce9964d5adf1b0d19e4 *R/indval.R
65687ca76a539d7f0d2bb701c3cf47b3 *R/isamic.R
d1a30a158cd636f9b9ed1fd711a534d3 *R/matrify.R
093d694a413100f182f7ad8d5a5c79f5 *R/metrify.R
a263da1d5633a1720011fecbc05acaaa *R/nmds.R
c8263b682bae06cf6223abe669e9cc7b *R/ordcomp.R
ee4c7f5e62d6aa1b6830857168d88cbf *R/orddist.R
af2d2fe9a93b709d54c9edfe0aa735c4 *R/ordpart.R
e2e96d55498410c76ac7eae0682480fd *R/ordtaxa.R
6cf4b508a236a724c6a2f74c18bbd031 *R/ordtest.R
58a1fe2625a5a7fc897431e4013f4b31 *R/metrify.R
5094d9b5328aae32be32ee11bdcd5754 *R/nmds.R
fd2381d8991293c730fb3e64bb9acf41 *R/ordcomp.R
57d4bef3143c4ec7800259574c63d72c *R/orddist.R
a2745d38d6f1226535729939bb872a99 *R/ordpart.R
132061e82a5ff47fdf0cdf9e22d90c82 *R/ordtaxa.R
85131f973a06c7079f0a03765d5b272a *R/ordtest.R
c2ef7136fbcf8e299acb7aeb47f9c909 *R/ordutils.R
45a6147f06aef059168441a6fc2fb829 *R/pca.R
32b0e775852a704d729191c6bf65d7ad *R/pco.R
39646f52893b9bc19dc377bbc21cf80c *R/raretaxa.R
983080df246ef70ed4209aa8438b0d08 *R/reconcile.R
561817dfeea411b5029fcf3e472017bc *R/rgl.nmds.R
561817dfeea411b5029fcf3e472017bc *R/rgl.pco.R
8bfee87ee23bf8345b5138ca329eb26c *R/rnddist.R
5d6bf23a29e0e870b39f8d8edef5c806 *R/rndtaxa.R
9eaa5d9aaa3e92170fa70f601d2fa9c8 *R/pca.R
c3f353ff4f4702338b42b0a80c4843cd *R/pco.R
8277e2b0b28423032fc771933d194fcd *R/raretaxa.R
a1bc7a6a843d3552d0d3a64e5dc1d407 *R/reconcile.R
7e2fdd6ca179d62f56c55aa9fc9416ea *R/rnddist.R
6ee9bb0936fbe980b52825122a898c36 *R/rndtaxa.R
5eb1b5e4a6b2b9524276a1d77fd54c6c *R/spcdisc.R
f865a23cce3e6b549df60be8367a71cb *R/thull.R
f590b66d550f7d74c70c79695e2d2760 *R/subset_dist.R
18cb4e06b3ad8122dd4d36c81a751c43 *R/thull.R
fad70626e843dbfe5ce9f653432a93f3 *R/vegtab.R
f044185b4fb7d4a472d7bcb723ea419e *R/vegtrans.R
c6e9ff7b4553b6648628aac8f5fb7022 *data/brycesite.rda
60afeab3cd00ea95cdc2e650fc022119 *data/bryceveg.rda
216eb2b5438aa3bf91855831dc3d7d45 *inst/ChangeLog
87eac16ae2595fac20637ee6e30d1bfc *man/abuocc.Rd
5ad93293730defa9dc410382a8bd3bd0 *man/brycesite.Rd
6cda9f4c5c94d38f031af2b726a5690f *R/vegtrans.R
317374d779f36ff7e2e2a8d8b9bd6887 *data/brycesite.rda
89c92cba617d6e7faf042ee5cf977604 *data/bryceveg.rda
d7469f380fdd7ac30590a338c31f1797 *inst/ChangeLog
10c851f8dbf2fa1e2c1fd86c1cbe615e *man/abuocc.Rd
75356b0fdd418ce70fe5f2d357e4d773 *man/brycesite.Rd
bb38a07374327d0f6929334ccba7bb9f *man/bryceveg.Rd
21a15869ae08d542ebfd78c76cab8aa9 *man/concov.Rd
5d4829017caaa698782789d542be4937 *man/const.Rd
80302528fcffebd840ea4a0a4edc3a61 *man/dematrify.Rd
dcdb3aad42b4d7bd13a65fa39485a595 *man/dga.Rd
d60b609e618a7470c16ea82d925fbb10 *man/disana.Rd
df61d6fa95bd7f1ba99e821f2c9a0e16 *man/dropplt.Rd
97bf220ca66bb89b2f0e32587943a2a8 *man/dropspc.Rd
4341456790f60d2b9cc3a49bfb3cabc1 *man/dsvdis.Rd
d0f8b73ae974abff9af3134afa058caf *man/envrtest.Rd
32855b28e59cb7507f5228f9b8e3dc96 *man/euclidify.Rd
e5525a17cc5b50ae9654e84ec650c0e1 *man/homoteneity.Rd
07b55ababefe31127b039f5786e8e685 *man/importance.Rd
89cd4a2eb2cb232e64d11e2ac7257c91 *man/indspc.Rd
b9ffebdc53d7e65465f0225fafaa21ca *man/indval.Rd
a837be348bc6468f39207909580cebfe *man/isamic.Rd
fc1120965aff3b633f9a5526f7b494be *man/clustify.Rd
88f661f9ac70bdf8ecff65f41b73805e *man/compspec.Rd
2d1fe6ac314560f764b73968ae337b04 *man/concov.Rd
d1d98609433cbc5a31bc2ff4d52e3e17 *man/const.Rd
e4588ab914c6a8d42888f45fca49aec1 *man/dematrify.Rd
3e36e4a7a426e985cd21adc1cadf52f1 *man/dga.Rd
244eddefe5076b565a57b1ccc48d62e4 *man/disana.Rd
82180373e8c79d377523f24e8e194e23 *man/dropplt.Rd
a9ef988d1100bd6f6ea1339373526057 *man/dropspc.Rd
02abae68af7d20ce03169007d36be11e *man/dsvdis.Rd
ce78fba68588f53b3abc248b5b7055dc *man/envrtest.Rd
40a29873cc873a92b5f270137f9b87eb *man/euclidify.Rd
d0fc82702d55976332155573292f6c10 *man/homoteneity.Rd
8679170eb5a89fbdd381763f946a21f7 *man/importance.Rd
e326797ac55bab96ff1b40442a4abf60 *man/indval.Rd
e74741307974286636b38c50c5e600db *man/isamic.Rd
3e38052d76e173b264286392e77282f3 *man/labdsv.internal.Rd
eee2012f0710845a5e533d948e356678 *man/matrify.Rd
c8fcd1ee2dbcf4d7685aaa89a709e45c *man/metrify.Rd
77b4ef5ab8a53a0c4c7762e05a2d3f3f *man/nmds.Rd
83d4042b4e1059076f9771f3764b344c *man/ordcomp.Rd
e1dbee59b353ae4f61ea50543136fb2d *man/orddist.Rd
77e5caccb8a380bcc45d9ca6e20830d1 *man/ordpart.Rd
0ad96abcacc8cb8d62807e742d1dedce *man/matrify.Rd
45fdf69576baf8793528f4bac9e24b3e *man/metrify.Rd
256eb688276688bf5d613660c0a39bce *man/nmds.Rd
f8d6531f63c6d52e00c09c01050532f8 *man/ordcomp.Rd
ebf25e7edd2676c65e25cb6092237012 *man/orddist.Rd
9126b4ad7af42fe482a2fc772099b0c4 *man/ordpart.Rd
ff45384cb1b534f024bd620b99d1ca0d *man/ordtaxa.Rd
6ce6e747ccfbdab4fdb2bff3298e9830 *man/ordtest.Rd
9d972a4e9a4437bb3bf84cafc80036bb *man/pca.Rd
1ff6cb22dbf79f1e8571bf8a8c3ae41f *man/pco.Rd
003448b862d4d6b59997e89bd1951d2a *man/plot.nmds.Rd
b316ce81214d8335e331d47a7dd321ef *man/plot.pca.Rd
442d73df488ad98be2153596b93ab4cf *man/plot.pco.Rd
1f3e5409293dadc8de99e123099941f5 *man/raretaxa.Rd
d10a1d9182bda2d47b9da4df5f5f0037 *man/reconcile.Rd
69bc86fa28e10b45aaced386f9f1a8cf *man/rnddist.Rd
bb6253d77c4a1e1a0a4fcf259e458f2e *man/rndtaxa.Rd
1cbc4040f681b8c7cb1e26eb23112a4a *man/spcdisc.Rd
04b99cf552ce160f7e34c1e3b7c6ef6e *man/thull.Rd
22a96a88660ad10d1ec6d199f33648c4 *man/vegtab.Rd
8271f5d5615dc55998f47db23e77d581 *man/vegtrans.Rd
4edd344728a4325094b4f9e895d655b2 *man/ordtest.Rd
9f4b6043e1c20f2cf5ea6850adab4eb6 *man/pca.Rd
6d4c3d22255faf5dd8fa1ff5e80ef5b3 *man/pco.Rd
7594c9669c9850109320a7ecf0bf5d07 *man/plot.nmds.Rd
6429a27ca1d311bac45c99736d036a70 *man/plot.pca.Rd
54c6ef84df3d5b89c70d05e788b1c7b0 *man/plot.pco.Rd
7484fcb63c1fa9f20989d448795d48ee *man/raretaxa.Rd
2edb07a95ad137742626e96785ca86c3 *man/reconcile.Rd
4d11e576878618ae1de1941a70fb2f9b *man/rnddist.Rd
4976135c6c795494ebfe4002d4d4eaa2 *man/rndtaxa.Rd
81cf7f1fa7ddf16a997ddd7b51420b9c *man/spcdisc.Rd
b16ba3f50651122cd5802838b54ecdb2 *man/thull.Rd
ca26a71aa1a4ab0034ebe2738fd53a8b *man/vegtab.Rd
70ee80e93a8b5710e2fb5bc4c830b748 *man/vegtrans.Rd
cac638caa8f7e197e3991006ddc1700f *src/dsvdis.f
ce02b38f9502e60c285b5b7e13b78450 *src/euclid.f
f42bd55292dfce6d598ea0a15684a80e *src/indval.f
Expand Down
61 changes: 48 additions & 13 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,24 +1,59 @@
# Remove the previous line if you edit this file

# Export all names
export(abuocc,concov,const,dematrify,dga,disana,dropplt,dropspc,dsvdis,
envrtest,euclidify,homoteneity,importance,indspc,plot.indspc,indval,
indval.default,indval.stride,summary.indval,isamic,matrify,metrify,
nmds,plot.nmds,points.nmds,plotid.nmds,surf.nmds,bestnmds,hilight.nmds,
chullord.nmds,density.nmds,rgl.nmds,ordcomp,orddist,ordpart,
ordpart.pco,ordpart.pca,ordpart.nmds,ordtaxa,ordtest,surf,plotid,
specid,hilight,chullord,thull,density,thull,pca,plot.pca,points.pca,
plotid.pca,surf.pca,summary.pca,scores.pca,loadings.pca,varplot.pca,
hilight.pca,chullord.pca,pco,plot.pco,points.pco,plotid.pco,surf.pco,
hilight.pco,chullord.pco,density.pco,rgl.pco,raretaxa,reconcile,
rgl.nmds,rgl.nmds,rnddist,rndtaxa,spcdisc,thull.nmds,thull.pco,
plot.thull,vegtab,vegtrans
export(
abuocc,bestnmds,chullord,chullord.nmds,chullord.pca,chullord.pco,
clustify,compspec,concov,const,dematrify,density,density.nmds,density.pco,
dga,disana,dropplt,dropspc,dsvdis,ellip.nmds,envrtest,euclidify,
hilight,hilight.nmds,hilight.pca,hilight.pco,homoteneity,importance,
indval,indval.default,indval.stride,isamic,loadings.pca,matrify,metrify,
nmds,ordcomp,orddist,ordpart,ordpart.nmds,ordpart.pca,ordpart.pco,ordtaxa,
ordtest,pca,pco,plot.compspec,plotid,plotid.nmds,plotid.pca,plotid.pco,
plot.nmds,plot.pca,plot.pco,plot.thull,plot.thull,points.nmds,points.pca,
points.pco,raretaxa,reconcile,rgl.nmds,rgl.nmds,rgl.nmds,rgl.pco,rnddist,
rndtaxa,scores.pca,spcdisc,specid,summary.indval,summary.pca,surf,surf.nmds,
surf.pca,surf.pco,thull,thull,thull.nmds,varplot.pca,vegtab,vegtrans
)

# register S3 Methods

S3method(chullord,nmds)
S3method(chullord,pca)
S3method(chullord,pco)
S3method(density,nmds)
S3method(density,pco)
S3method(hilight,nmds)
S3method(hilight,pca)
S3method(hilight,pco)
S3method(indval,default)
S3method(indval,stride)
S3method(ordpart,nmds)
S3method(ordpart,pca)
S3method(ordpart,pco)
S3method(plot,compspec)
S3method(plot,nmds)
S3method(plot,pca)
S3method(plot,pco)
S3method(plot,thull)
S3method(plotid,nmds)
S3method(plotid,pca)
S3method(plotid,pco)
S3method(points,nmds)
S3method(points,pca)
S3method(points,pco)
S3method(summary,indval)
S3method(summary,pca)
S3method(surf,nmds)
S3method(surf,pca)
S3method(surf,pco)
S3method(thull,nmds)

# Import all packages listed as Imports or Depends
import(
mgcv,
MASS
MASS,
cluster,
rgl
)

useDynLib(labdsv)
Expand Down
76 changes: 41 additions & 35 deletions R/abuocc.R
Original file line number Diff line number Diff line change
@@ -1,42 +1,48 @@
abuocc <- function(taxa,minabu=0)
abuocc <- function (taxa, minabu = 0, panel='all')
{
if (!is.data.frame(taxa)) taxa <- data.frame(taxa)

spc.plt <- apply(taxa>minabu,1,sum)
plt.spc <- apply(taxa>minabu,2,sum)

if (minabu==0) {
mean.abu <- apply(taxa,2,sum)/plt.spc
if (!is.data.frame(taxa))
taxa <- data.frame(taxa)
spc.plt <- apply(taxa > minabu, 1, sum)
plt.spc <- apply(taxa > minabu, 2, sum)
if (minabu == 0) {
mean.abu <- apply(taxa, 2, sum)/plt.spc
} else {
mean.abu <- rep(0,ncol(taxa))
mean.abu <- rep(0, ncol(taxa))
for (i in 1:ncol(taxa)) {
mask <- taxa[,i]>minabu
mean.abu[i] <- sum(taxa[mask,i]) / max(1,plt.spc[i])
mask <- taxa[, i] > minabu
mean.abu[i] <- sum(taxa[mask, i])/max(1, plt.spc[i])
}
}
mean.abu[is.na(mean.abu)] <- 0

plot(rev(sort(plt.spc[plt.spc>minabu])),log="y",xlab="Species Rank",ylab="Number of Plots",
main="Species Occurrence")
readline("Press return for next plot ")

plot(rev(sort(spc.plt)),xlab="Plot Rank",ylab="Number of Species",
main="Species/Plot")
readline("Press return for next plot ")

plot(plt.spc[mean.abu>minabu],mean.abu[mean.abu>minabu],log="y",xlab="Number of Plots",ylab="Mean Abundance",
main="Abundance vs Occurrence")
yorn <- readline("Do you want to identify individual species? Y/N : ")
if (yorn == 'Y' || yorn == 'y')
identify(plt.spc[mean.abu>minabu],mean.abu[mean.abu>minabu],names(taxa)[mean.abu>minabu])
readline("Press return for next plot ")

plot(spc.plt,apply(taxa,1,sum),xlab="Number of Species/Plot",
ylab="Total Abundance")
yorn <- readline("Do you want to identify individual plots? Y/N : ")
if (yorn == 'Y' || yorn == 'y')
identify(spc.plt,apply(taxa,1,sum),labels=row.names(taxa))

invisible(list(spc.plt=spc.plt,plt.spc=plt.spc,mean=mean.abu))
if (panel=='all' || panel==1) {
plot(rev(sort(plt.spc[plt.spc > minabu])), log = "y", xlab = "Species Rank",
ylab = "Number of Plots", main = "Species Occurrence")
if (panel == 'all') readline("Press return for next plot ")
}
if (panel=='all' || panel==2) {
plot(rev(sort(spc.plt)), xlab = "Plot Rank", ylab = "Number of Species",
main = "Species/Plot")
if (panel=='all') readline("Press return for next plot ")
}
if (panel=='all' || panel==3) {
plot(plt.spc[mean.abu > minabu], mean.abu[mean.abu > minabu],
log = "y", xlab = "Number of Plots", ylab = "Mean Abundance",
main = "Abundance vs Occurrence")
yorn <- readline("Do you want to identify individual species? Y/N : ")
if (yorn == "Y" || yorn == "y")
identify(plt.spc[mean.abu > minabu], mean.abu[mean.abu >
minabu], names(taxa)[mean.abu > minabu])
if (panel=='all') readline("Press return for next plot ")
}
if (panel=='all' || panel==4) {
plot(spc.plt, apply(taxa, 1, sum), xlab = "Number of Species/Plot",
ylab = "Total Abundance")
yorn <- readline("Do you want to identify individual plots? Y/N : ")
if (yorn == "Y" || yorn == "y")
identify(spc.plt, apply(taxa, 1, sum), labels = row.names(taxa))
}
out <- list(spc.plt = spc.plt, plt.spc = plt.spc, mean = mean.abu)
attr(out,'call') <- match.call()
attr(out,'taxa') <- deparse(substitute(taxa))
invisible(out)
}

Loading

0 comments on commit a56af17

Please sign in to comment.