From b4ab53b89dfc7e37cb70648a0dca7be96f2c736b Mon Sep 17 00:00:00 2001 From: Nick-Eagles Date: Thu, 2 Nov 2023 17:20:19 -0400 Subject: [PATCH] Import 'stats' used for 'prcomp' --- DESCRIPTION | 3 ++- NAMESPACE | 1 + R/multi_gene.R | 2 +- tests/testthat/test-multi_gene.R | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ffbef84..7d4fb34 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,4 +27,5 @@ Imports: SpatialExperiment, SummarizedExperiment, Matrix, - MatrixGenerics + MatrixGenerics, + stats diff --git a/NAMESPACE b/NAMESPACE index f8239fd..eceb913 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -10,4 +10,5 @@ import(SpatialExperiment) import(SummarizedExperiment) import(ggplot2) import(spatialLIBD) +import(stats) import(viridisLite) diff --git a/R/multi_gene.R b/R/multi_gene.R index 1cbb6b0..b733acc 100644 --- a/R/multi_gene.R +++ b/R/multi_gene.R @@ -138,7 +138,7 @@ spot_plot_sparsity <- function(spe, genes, sample_id, assayname = "counts", minC #' #' @export #' @author Nicholas J. Eagles -#' @import SpatialExperiment SummarizedExperiment Matrix +#' @import SpatialExperiment SummarizedExperiment stats #' @family Spot plots summarizing expression of multiple genes simultaneously #' #' @examples diff --git a/tests/testthat/test-multi_gene.R b/tests/testthat/test-multi_gene.R index ec234f2..14b66ba 100644 --- a/tests/testthat/test-multi_gene.R +++ b/tests/testthat/test-multi_gene.R @@ -34,7 +34,7 @@ test_plot_fun <- function(spe, plot_fun) { "internally handled and may not be specified" ) expect_error( - plot_fun(spe, genes, sample_id, var_name = 'sample_id'), + plot_fun(spe, genes, sample_id, var_name = "sample_id"), "internally handled and may not be specified" )