Skip to content

Commit

Permalink
Pass R CMD check before pushing to Bioconductor git
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdamoses committed Feb 23, 2023
1 parent eca441e commit 5d516fc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
12 changes: 7 additions & 5 deletions R/plot-non-spatial.R
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ plotColDataHistogram <- .plot_dimdata_hist(colData)
plotRowDataHistogram <- .plot_dimdata_hist(rowData)

.plot_dimdata_freqpoly <- function(fun) {
function(sfe, feature, color_by = NULL, subset = NULL, bins = 100,
function(sfe, feature, color_by = NULL, subset = NULL, bins = 100,
binwidth = NULL, linewidth = 1.2,
scales = "free", ncol = 1, position = "identity") {
df <- as.data.frame(fun(sfe))[, c(feature, color_by, subset), drop = FALSE]
Expand Down Expand Up @@ -284,20 +284,22 @@ plotRowDataHistogram <- .plot_dimdata_hist(rowData)
}

#' Plot frequency polygons for colData and rowData columns
#'
#'
#' This function is recommended instead of \code{\link{plotColDataHistogram}}
#' when coloring by multiple categories and log transforming the y axis, which
#' causes problems in stacked histograms.
#'
#' causes problems in stacked histograms.
#'
#' @inheritParams ggplot2::geom_freqpoly
#' @inheritParams plotColDataHistogram
#' @param linewidth Line width of the polygons, defaults to a thicker 1.2.
#' @param color_by Name of a categorical column in \code{colData} or
#' \code{rowData} to color the polygons.
#' @seealso plotColDataHistogram
#' @export
#' @examples
#' library(SFEData)
#' sfe <- McKellarMuscleData()
#' plotColDataFreqpoly(sfe, c("nCounts", "nGenes"), fill_by = "in_tissue",
#' plotColDataFreqpoly(sfe, c("nCounts", "nGenes"), color_by = "in_tissue",
#' bins = 50)
#' plotColDataFreqpoly(sfe, "nCounts", subset = "in_tissue")
#' sfe2 <- sfe[, sfe$in_tissue]
Expand Down
5 changes: 4 additions & 1 deletion man/plotColDataFreqpoly.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/plotColDataHistogram.Rd

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

0 comments on commit 5d516fc

Please sign in to comment.