-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e08d76d
commit a56af17
Showing
81 changed files
with
1,308 additions
and
1,027 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
|
Oops, something went wrong.