diff --git a/R/gg_envfit.R b/R/gg_envfit.R index b4afc8b..b696cc6 100644 --- a/R/gg_envfit.R +++ b/R/gg_envfit.R @@ -43,6 +43,7 @@ #' gg_envfit(dune.mds, env=A1, groups=dune.env$Management) #' gg_envfit <- function(ord, env, groups=NA, scaling = 1, choices=c(1,2), perm = 999, alpha = 0.05, angle=20, len=0.5, unit="cm", arrow.col="red", pt.size=3, plot=TRUE) { + x <- y <- Group <- NULL df_ord <- vegan::scores(ord, display = "sites", choices = choices, scaling = scaling) df_ord <- as.data.frame(df_ord) axis.labels <- ord_labels(ord)[choices] diff --git a/R/gg_ordibubble.R b/R/gg_ordibubble.R index 5a891ef..e08e9c9 100644 --- a/R/gg_ordibubble.R +++ b/R/gg_ordibubble.R @@ -24,6 +24,7 @@ #' gg_ordibubble(ord, env.var=dune.env$A1, var.label="A1") #' gg_ordibubble <- function(ord, env.var, groups=NA, var.label="Level", choices=c(1,2), plot=TRUE) { + x <- y <- Group <- NULL df_ord <- as.data.frame(vegan::scores(ord, display="sites", choices=choices)) axis.labels <- ord_labels(ord)[choices] diff --git a/R/gg_ordicluster.R b/R/gg_ordicluster.R index e818fa8..d341b18 100644 --- a/R/gg_ordicluster.R +++ b/R/gg_ordicluster.R @@ -31,7 +31,7 @@ #' gg_ordicluster(ord, cluster=cl, treatments=dune.env$Management, prune=3, col=cutree(cl, 4)) #' gg_ordicluster <- function (ord, cluster, treatments=NA, choices=c(1,2), prune = 0, col = 1, pt.size = 3, plot=TRUE) -{ +{ x <- y <- xend <- yend <- Treatment <- cntr.x <- cntr.y <- NULL if (is.numeric(treatments)) { stop("'treatments' cannot be numeric") } diff --git a/R/gg_ordiplot.R b/R/gg_ordiplot.R index 5b42604..bd6ce27 100644 --- a/R/gg_ordiplot.R +++ b/R/gg_ordiplot.R @@ -32,6 +32,7 @@ #' gg_ordiplot(ord, groups = dune.env$Management) #' gg_ordiplot <- function(ord, groups, scaling = 1, choices = c(1,2), kind = c("sd", "se", "ehull"), conf=NULL, show.groups="all", ellipse = TRUE, label = FALSE, hull = FALSE, spiders = FALSE, pt.size = 3, plot=TRUE) { + x <- y <- cntr.x <- cntr.y <- Group <- NULL groups <- as.factor(groups) if (show.groups[1]=="all") { show.groups <- as.vector(levels(groups)) diff --git a/R/gg_ordisurf.R b/R/gg_ordisurf.R index 718f8f9..eb6c66b 100644 --- a/R/gg_ordisurf.R +++ b/R/gg_ordisurf.R @@ -39,7 +39,7 @@ gg_ordisurf <- function(ord, env.var, groups=NA, choices=c(1,2), var.label="Level", binwidth, pt.size=3, family = "gaussian", plot=TRUE) { - + x <- y <- z <- Group <- ..level.. <- NULL groups <- as.factor(groups) # Extract ordisurf data for plotting