Skip to content

Commit

Permalink
Solve no visible binding for global variable notes by setting alll to…
Browse files Browse the repository at this point in the history
… NULL at beginning of functions
  • Loading branch information
jfq3 committed Aug 1, 2023
1 parent 93dad64 commit e7488bc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions R/gg_envfit.R
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions R/gg_ordibubble.R
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion R/gg_ordicluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
1 change: 1 addition & 0 deletions R/gg_ordiplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion R/gg_ordisurf.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e7488bc

Please sign in to comment.