Skip to content

Commit

Permalink
copied dev to main
Browse files Browse the repository at this point in the history
  • Loading branch information
mgimond committed Mar 19, 2024
1 parent 6cf8a50 commit 79fa21c
Show file tree
Hide file tree
Showing 45 changed files with 99 additions and 77 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# tukeyedar 0.2.3
* Added `show.par` option to `eda_qq`
* fixed issue #17.

# tukeyedar 0.2.2
* Re-wrote eda_rline function. This also fixed issue #15.
Expand Down
9 changes: 7 additions & 2 deletions R/eda_dens.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#' @param legend Boolean determining if a legend should be added to the plot.
#' @param xlab X variable label. Ignored if \code{x} is a dataframe.
#' @param ylab Y variable label. Ignored if \code{x} is a dataframe.
#' @param show.par Boolean determining if parameters such as power
#' transformation or formula should be displayed.
#' @param ... Arguments passed to the \code{stats::density()} function.
#'
#' @details This function will generate overlapping density plots with the first
Expand All @@ -49,7 +51,7 @@


eda_dens <- function(x, y, fac = NULL, p = 1L, tukey = FALSE, fx = NULL,
fy = NULL, grey = 0.6, col = "red", size = 0.8,
fy = NULL, grey = 0.6, col = "red", size = 0.8, show.par= TRUE,
alpha = 0.4, xlab = NULL, ylab = NULL, legend = TRUE, ...) {

# Extract data
Expand Down Expand Up @@ -151,7 +153,10 @@ eda_dens <- function(x, y, fac = NULL, p = 1L, tukey = FALSE, fx = NULL,
tck = -0.02)
mtext("Density", side=3, adj= -0.1 , col=plotcol, padj = -1)
title(xlab = "Value", line = 1.8, col.lab=plotcol)
mtext(side = 3, text=paste0("p=",p,";",fx," ",fy,sep=""), adj=1, cex = 0.65)

if(show.par == TRUE){
mtext(side = 3, text=paste0("p=",p,";",fx," ",fy,sep=""), adj=1, cex = 0.65)
}

if (legend == TRUE){
sq <- par("usr") # get plot corners
Expand Down
4 changes: 2 additions & 2 deletions R/eda_qq.R
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,11 @@ eda_qq <- function(x, y=NULL, fac = NULL, norm = FALSE, p = 1L, tukey = FALSE,
}

# Add power/formula parameters to plot
if(norm != TRUE){
if(norm != TRUE & show.par == TRUE){
params <- gsub(";\\s*;?\\s*$", "", paste0("p=", p,"; ",fx,"; ",fy))
params <- gsub("\\; \\;", ";", params)
mtext(side = 3, text=params, adj=1, cex = 0.65)
} else {
} else if (show.par == TRUE) {
mtext(side = 3, text=paste0("p=",p), adj=1, cex = 0.65)
}

Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions docs/articles/RLine.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/articles/RLine_files/figure-html/unnamed-chunk-22-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/RLine_files/figure-html/unnamed-chunk-25-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/polish.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/articles/qq.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
pandoc: 3.1.1
pkgdown: 2.0.7
pkgdown_sha: ~
pkgdown: 2.0.7.9000
pkgdown_sha: 13d8d621105a3a527a05e46c6c805a6564c39791
articles:
polish: polish.html
qq: qq.html
RLine: RLine.html
last_built: 2024-02-07T14:47Z
last_built: 2024-03-19T00:07Z
urls:
reference: https://mgimond.github.io/tukeyedar/reference
article: https://mgimond.github.io/tukeyedar/articles
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/age_height.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/eda_3pt.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/eda_add.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/eda_bipow.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/eda_boxls.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion docs/reference/eda_dens.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/eda_lm.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/eda_lsum.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/reference/eda_normfit-12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/reference/eda_normfit.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/eda_pol.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/eda_qq.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/eda_re.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/reference/eda_rline-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/reference/eda_rline.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/eda_sl.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/eda_trim.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/eda_unipow.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 79fa21c

Please sign in to comment.