Skip to content

Commit

Permalink
Merge branch 'vegan3d-updates'
Browse files Browse the repository at this point in the history
  • Loading branch information
jarioksa committed Mar 21, 2024
2 parents 2e38e22 + 3db0b92 commit 83cae68
Show file tree
Hide file tree
Showing 12 changed files with 268 additions and 414 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Authors@R: c(person("Jari", "Oksanen", role=c("aut","cre"),
person("Adrian", "Stier", role="aut"),
person("Cajo J.F.", "Ter Braak", role="aut"),
person("James", "Weedon", role="aut"))
Depends: permute (>= 0.9-0), lattice, R (>= 3.6.0)
Depends: permute (>= 0.9-0), lattice, R (>= 4.1.0)
Suggests: parallel, tcltk, knitr, markdown
Imports: MASS, cluster, mgcv
VignetteBuilder: utils, knitr
Expand Down
8 changes: 8 additions & 0 deletions R/orditkplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
stop("your R has no capability for Tcl/Tk")
requireNamespace("tcltk") || stop("requires package tcltk")

### orditkplot was moved to vegan3d and is in CRAN since vegan3d_1.3-0
### (2024-03-19)

tcltk::tkmessageBox(message = "orditkplot is deprecated",
detail = "function was moved to CRAN package vegan3d",
icon = "warning",
type = "ok")

############################
### Check and sanitize input
###########################
Expand Down
1 change: 1 addition & 0 deletions R/plot.orditkplot.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
`plot.orditkplot` <-
function(x, ...)
{
.Deprecated(msg = "function was moved to CRAN package vegan3d")
op <- par(x$par)
on.exit(par(op))
plot(x$points, pch = x$args$pch, cex = x$args$pcex, col = x$args$pcol,
Expand Down
4 changes: 3 additions & 1 deletion R/points.orditkplot.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
`points.orditkplot` <- function(x, pch = x$args$pch, cex = x$args$pcex,
col = x$args$pcol, bg = x$args$pbg, ...) {
col = x$args$pcol, bg = x$args$pbg, ...)
{
.Deprecated(msg = "function was moved to CRAN package vegan3d")
points(x$points, pch = pch, cex = cex, col = col, bg = bg, ...)
}

1 change: 1 addition & 0 deletions R/scores.orditkplot.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
`scores.orditkplot` <-
function(x, display, ...)
{
.Deprecated(msg = "function was moved to CRAN package vegan3d")
if (!missing(display) && !is.na(pmatch(display, "labels")))
x$labels
else
Expand Down
4 changes: 3 additions & 1 deletion R/text.orditkplot.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
`text.orditkplot` <- function(x, cex = x$args$tcex, col = x$args$tcol,
font = attr(x$labels, "font"), ...) {
font = attr(x$labels, "font"), ...)
{
.Deprecated(msg = "function was moved to CRAN package vegan3d")
if (is.null(font)) {
font <- par("font")
}
Expand Down
4 changes: 1 addition & 3 deletions man/ordiplot.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ pl <- ordiplot(dune.mds, type = "none")
points(pl, "sites", pch=21, col="red", bg="yellow")
text(pl, "species", col="blue", cex=0.9)
\dontrun{
## same plot using pipes (pipes |> are available from R version 4.1.0)
if (getRversion() >= "4.1") {
## same plot using pipes (|>)
ordiplot(dune.mds, type="n") |>
points("sites", pch=21, col="red", bg="yellow") |>
text("species", col="blue", cex=0.9)
Expand All @@ -137,7 +136,6 @@ plot(mod, type="n") |>
points("sites", pch=16, col="red") |>
text("species", arrows = TRUE, length=0.05, col="blue")
}
}
## Default plot of the previous using identify to label selected points
\dontrun{
pl <- ordiplot(dune.mds)
Expand Down
173 changes: 0 additions & 173 deletions man/orditkplot.Rd

This file was deleted.

30 changes: 29 additions & 1 deletion man/vegan-deprecated.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
\name{vegan-deprecated}

\alias{adonis}
\alias{orditkplot}
\alias{plot.orditkplot}
\alias{scores.orditkplot}
\alias{points.orditkplot}
\alias{text.orditkplot}
\alias{as.mcmc.oecosimu}
\alias{as.mcmc.permat}
\alias{vegan-deprecated}
Expand All @@ -19,6 +24,17 @@
adonis(formula, data, permutations = 999, method = "bray",
strata = NULL, contr.unordered = "contr.sum",
contr.ordered = "contr.poly", parallel = getOption("mc.cores"), ...)
orditkplot(x, display = "species", choices = 1:2, width, xlim, ylim,
tcex = 0.8, tcol, pch = 1, pcol, pbg, pcex = 0.7, labels, ...)
## moved to vegan3d package: install from CRAN
orditkplot(x, display = "species", choices = 1:2, width, xlim, ylim,
tcex = 0.8, tcol, pch = 1, pcol, pbg, pcex = 0.7, labels, ...)
\method{plot}{orditkplot}(x, ...)
\method{points}{orditkplot}(x, pch = x$args$pch, cex = x$args$pcex,
col = x$args$pcol, bg = x$args$pbg, ...)
\method{text}{orditkplot}(x, cex = x$args$tcex, col = x$args$tcol,
font = attr(x$labels, "font"), ...)
\method{scores}{orditkplot}(x, display, ...)
## use toCoda instead
as.mcmc.oecosimu(x)
as.mcmc.permat(x)
Expand All @@ -29,7 +45,16 @@ as.mcmc.permat(x)
\code{\link{adonis2}}.}
\item{strata}{groups (strata) within which to constrain permutations.}
\item{contr.unordered, contr.ordered}{contrasts used for design matrix.}
\item{x}{object to be tranformed.}
\item{x}{ordination result \code{orditkplot} or object to be
tranformed \code{as.mcmc}.}
\item{display, choices}{kind of scores and number of axes.}
\item{width}{size of Tcl/Tk window in inches.}

\item{xlim, ylim, tcex, tcol, pch, pcol, pbg, pcex, labels, cex,
col, bg, font}{graphical parameters similar to standard
\code{plot} functions; those applied only to points preceded with
\code{p}, and those to text with \code{t}.}

}

\details{
Expand All @@ -40,6 +65,9 @@ as.mcmc.permat(x)
arguments \code{contr.unordered} and \code{contr.ordered} can set the
contrasts within \code{adonis}.

\code{orditkplot} was moved to \CRANpkg{vegan3d} (version
1.3-0). Install that package from CRAN and use in the old way.

}

\seealso{
Expand Down
Loading

0 comments on commit 83cae68

Please sign in to comment.