Skip to content

Commit

Permalink
add show.par argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mgimond committed Jun 5, 2023
1 parent 84f56c0 commit 24788f2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/eda_qq.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#' @param fy Formula to apply to y variable. This is computed after any
#' transformation is applied to the y variable.
#' @param plot Boolean determining if plot should be generated.
#' @param show.par Boolean determining if parameters such as power
#' transformation or formula should be displayed.
#' @param grey Grey level to apply to plot elements (0 to 1 with 1 = black).
#' @param pch Point symbol type.
#' @param p.col Color for point symbol.
Expand Down Expand Up @@ -106,7 +108,7 @@


eda_qq <- function(x, y, fac = NULL, p = 1L, tukey = FALSE, md = FALSE,
q.type = 5, fx = NULL, fy = NULL, plot = TRUE,
q.type = 5, fx = NULL, fy = NULL, plot = TRUE, show.par = TRUE,
grey = 0.6, pch = 21, p.col = "grey50", p.fill = "grey80",
size = 0.8, alpha = 0.8, q = TRUE, b.val = c(0.25,0.75),
l.val = c(0.125, 0.875), xlab = NULL, ylab = NULL, ...) {
Expand Down Expand Up @@ -267,7 +269,9 @@ eda_qq <- function(x, y, fac = NULL, p = 1L, tukey = FALSE, md = FALSE,
rect(xleft = sq[1], xright = sq[2], ybottom=qy[1],ytop=qy[2],
col = rgb(0,0,0,0.05), border = NA)
}
mtext(side = 3, text=paste("p=", p, fx ,fy,sep=" "), adj=1, cex = 0.65)
if(show.par == TRUE){
mtext(side = 3, text=paste("p=", p, fx ,fy,sep=" "), adj=1, cex = 0.65)
}
}

# Reset plot parameters and output values
Expand Down

0 comments on commit 24788f2

Please sign in to comment.