Skip to content

Commit 772f956

Browse files
committed
Use BiocGenerics::transform()
1 parent 8fafb05 commit 772f956

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ importFrom(BiocGenerics,colnames)
117117
importFrom(BiocGenerics,combine)
118118
importFrom(BiocGenerics,rownames)
119119
importFrom(BiocGenerics,table)
120+
importFrom(BiocGenerics,transform)
120121
importFrom(DBI,dbIsValid)
121122
importFrom(DelayedArray,DelayedArray)
122123
importFrom(EBImage,rotate)

R/trans.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#' @title Transformations
44
#' @aliases transform scale rotate translation flip flop mirror sequence
55
#'
6-
#' @param x,_data \code{SpatialData} element.
6+
#' @param x \code{SpatialData} element.
77
#' @param i scalar integer or string; target coordinate space.
88
#' @param t transformation data; exceptions: for \code{mirror}, controls
99
#' whether to perform \bold{v}ertical or \bold{h}orizontal reflection;
@@ -48,13 +48,13 @@
4848
#' y["shapes", c("rot", "wide", "left")]
4949
NULL
5050

51+
#' @importFrom BiocGenerics transform
5152
#' @export
5253
#' @rdname trans
53-
setMethod("transform", "SpatialDataElement", \(`_data`, i=1, ...) {
54+
setMethod("transform", "SpatialDataElement", \(x, i=1, ...) {
5455
stopifnot(
5556
length(i) == 1, is.character(i) |
5657
(is.numeric(i) && i == round(i)))
57-
x <- `_data`
5858
if (is.character(i)) {
5959
i <- match.arg(i, CTname(x))
6060
i <- match(i, CTname(x))

man/trans.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)