Skip to content

Commit

Permalink
lmplots tweak fixes loop problem
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDedman committed Dec 18, 2023
1 parent 6607694 commit 7b51497
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/gbm.lmplots.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ gbm.lmplots <- function(samples = NULL, # dataframe
pointcol = "black", # points colour
...
){
for (i in expvar) {
for (i in expvar) { # i <- "Tide"
print(paste0("plotting ", which(expvar %in% i), "/", length(expvar), ": ", i))
# overwrite xname if expvarnames present
xname <- ifelse(test = is.null(expvarnames),
yes = i,
no = expvarnames[which(expvar %in% i)])
# overwrite plotname if plotname present
plotname <- ifelse(test = is.null(plotname),
plotnameFun <- ifelse(test = is.null(plotname),
yes = xname,
no = plotname[which(expvar %in% i)])
# overwrite yname if resvarname present
Expand All @@ -78,7 +78,7 @@ gbm.lmplots <- function(samples = NULL, # dataframe
pngtype = c("cairo-png", "quartz", "Xlib"),
# xlab = xname, # x axis label, parsed from xname unless specified
# ylab = yname, # y axis label, parsed from yname unless specified
plotname = plotname, # filename for png, parsed from xname unless specified
plotname = plotnameFun, # filename for png, parsed from xname unless specified
r2line = r2line, # plot rsquared trendline, default TRUE
pointtext = pointtext, # label each point? Default false
pointlabs = pointlabs, # point labels, defaults to resvar value
Expand Down

0 comments on commit 7b51497

Please sign in to comment.