From 019b0b55bfad3e62e56b3034a48b19ee1975c4e2 Mon Sep 17 00:00:00 2001 From: wolski Date: Tue, 3 Sep 2024 22:33:32 +0200 Subject: [PATCH] temp --- R/utilities.R | 6 +++++- man/LFQDataPlotter.Rd | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/R/utilities.R b/R/utilities.R index 9dd74eb0..502615fb 100644 --- a/R/utilities.R +++ b/R/utilities.R @@ -460,7 +460,11 @@ panel_cor <- function(x, y, digits = 2, ...) #' pairs_smooth(tmp,log="xy",main="small data", legend=TRUE) #' @seealso also \code{\link{pairs}} pairs_smooth <- function(data, legend = FALSE, ...) { - + non_na_counts <- apply(data, 2, function(x) sum(!is.na(x))) + min_col <- which(non_na_counts < 2) + if(length(min_col) >= 1){ + data <- data[, -min_col, drop = FALSE] + } pairs( data, upper.panel = function(x, y) { diff --git a/man/LFQDataPlotter.Rd b/man/LFQDataPlotter.Rd index 00fe9bdf..e3d890a6 100644 --- a/man/LFQDataPlotter.Rd +++ b/man/LFQDataPlotter.Rd @@ -19,13 +19,13 @@ lfqdata <- LFQData$new( istar$data, istar$config) #LFQDataPlotter$debug("boxplots") +LFQDataPlotter$debug("pairs_smooth") lfqplotter <- lfqdata$get_Plotter() stopifnot(class(lfqplotter$heatmap()) == "pheatmap") stopifnot(class(lfqplotter$heatmap_cor()) == "pheatmap") stopifnot("ggplot" \%in\% class(lfqplotter$pca())) stopifnot("plotly" \%in\% class(lfqplotter$pca_plotly())) - tmp <- lfqplotter$boxplots() stopifnot("ggplot" \%in\% class(tmp$boxplot[[1]])) stopifnot("ggplot" \%in\% class(lfqplotter$missigness_histogram()))