diff --git a/.Rbuildignore b/.Rbuildignore index 106698f..798fa87 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,4 +7,4 @@ ^data-raw$ ^.github$ ^vignettes/merfish_mousePOA_raw.RDS$ -^vignettes/formatting-SpatialExperiment-for-SEraster.Rmd$ \ No newline at end of file +^vignettes/formatting-SpatialExperiment-for-SEraster.Rmd$ diff --git a/DESCRIPTION b/DESCRIPTION index 132be2c..e71563d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -42,7 +42,7 @@ Suggests: testthat (>= 3.0.0), knitr, rmarkdown -VignetteBuilder: knitr, rmarkdown +VignetteBuilder: knitr Config/testthat/edition: 3 RoxygenNote: 7.3.1 Depends: diff --git a/R/main.R b/R/main.R index c3f4286..2fd6d01 100644 --- a/R/main.R +++ b/R/main.R @@ -645,7 +645,7 @@ permutateByRotation <- function(input, n_perm = 1, verbose = FALSE) { ## get original x,y coordinates pos_orig <- data.frame(spatialCoords(spe)) - stopifnot("Column 1 and 2 of the spatialCoords slot should be named x and y, respectively. Please change column names accordingly."=colnames(pos_orig)[1:2] == c("x", "y")) + stopifnot("Column 1 and 2 of the spatialCoords slot should be named x and y, respectively. Please change column names accordingly."=colnames(pos_orig)[seq_along(c("x", "y"))] == c("x", "y")) output2 <- lapply(angles, function(angle) { ## rotate around the midrange point @@ -679,7 +679,7 @@ permutateByRotation <- function(input, n_perm = 1, verbose = FALSE) { ## get original x,y coordinates pos_orig <- data.frame(spatialCoords(input)) - stopifnot("Column 1 and 2 of the spatialCoords slot should be named x and y, respectively. Please change column names accordingly."=colnames(pos_orig)[1:2] == c("x", "y")) + stopifnot("Column 1 and 2 of the spatialCoords slot should be named x and y, respectively. Please change column names accordingly."=colnames(pos_orig)[seq_along(c("x", "y"))] == c("x", "y")) output <- lapply(angles, function(angle) { ## rotate around the midrange point