Skip to content

Commit

Permalink
last bugfix for release
Browse files Browse the repository at this point in the history
  • Loading branch information
vertesy committed Oct 31, 2021
1 parent f551085 commit c3581b8
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Imports:
tidyverse
Encoding: UTF-8
LazyData: true
Packaged: 2021-10-31 14:27:46
Packaged: 2021-10-31 14:43:28
Repository: CRAN
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
2 changes: 1 addition & 1 deletion R/ggExpress.auxiliary.functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ flag.nameiftrue <- function(toggle, prefix = NULL, suffix = NULL, name.if.not =
#' @param ... Pass any other parameter of the corresponding plotting function(most of them should work).
#' @export
#'
#' @examples xplot <- qplot(12); qqSave(ggobj = xplot); qqSave(ggobj = xplot, ext = "pdf")
#' @examples xplot <- ggplot2::qplot(12); qqSave(ggobj = xplot); qqSave(ggobj = xplot, ext = "pdf")

qqSave <- function(ggobj, w =4, h = w
, ext =c("png", "pdf")[1], also.pdf = FALSE
Expand Down
18 changes: 11 additions & 7 deletions R/ggExpress.functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#' @param plotname The name of the file and title of the plot.
#' @param vline Draw a vertical line on the plot.
#' @param filtercol Color bars below / above the threshold with red / green. Define the direction by -1 or 1. Takes effect if "*line" is defined.
#' @param palette_use GGpubr Color palette to use.
#' @param col Color of the plot.
#' @param logX Make X axis log10-scale.
#' @param logY Make Y axis log10-scale.
#' @param max.names The maximum number of names still to be shown on the axis.
Expand All @@ -44,11 +46,13 @@
#'
#' @examples weight <- rnorm(1000); qhistogram(vec = weight); qhistogram(vec = weight, vline = 2, filtercol = -1)


qhistogram <- function(vec, ext = "pdf", xlab = F, plot = TRUE, save = TRUE, mdlink = TRUE
, suffix = NULL
, plotname = qqqParsePlotname(vec, suffix)
, vline = F, filtercol = NULL
, logX = F, logY = F
, vline = F, filtercol = 0
, palette_use = 'jco', col = as.character(1:3)[1]
, max.names = 50
, w = 5, h = w, ...) {
if (isFALSE(xlab)) xlab = plotname
Expand All @@ -63,11 +67,11 @@ qhistogram <- function(vec, ext = "pdf", xlab = F, plot = TRUE, save = TRUE, mdl
}

p <- ggpubr::gghistogram(data = df, x = "value"
, title = plotname, xlab = xlab
, add = "median"
# , color = "names", fill = "names"
, color = 'colour', fill = 'colour'
, palette = 'jco', ...
, title = plotname, xlab = xlab
, add = "median"
# , color = "names", fill = "names"
, color = 'colour', fill = 'colour'
, palette = 'jco', ...
) +
if (length(unique(df$"names")) == 1) ggplot2::theme(legend.position = "none")
if (logX) p <- p + ggplot2::scale_x_log10()
Expand Down Expand Up @@ -142,7 +146,7 @@ qdensity <- function(vec, ext = "pdf", xlab = F, plot = TRUE
#' @param mdlink Insert a .pdf and a .png image link in the markdown report, set by "path_of_report".
#' @param hline Draw a horizontal line on the plot.
#' @param filtercol Color bars below / above the threshold with red / green. Define the direction by -1 or 1. Takes effect if "*line" is defined.
#' @param palette_use palette_use
#' @param palette_use GGpubr Color palette to use.
#' @param col Color of the plot.
#' @param xlab.angle Rotate X-axis labels by N degree.
#' @param xlab X-axis label.
Expand Down
5 changes: 0 additions & 5 deletions ggExpressDev.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ SaveWorkspace: No
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes
LineEndingConversion: Posix
Expand Down
2 changes: 1 addition & 1 deletion man/qbarplot.Rd

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

14 changes: 10 additions & 4 deletions man/qhistogram.Rd

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

2 changes: 1 addition & 1 deletion man/qqSave.Rd

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

0 comments on commit c3581b8

Please sign in to comment.