diff --git a/NAMESPACE b/NAMESPACE index 1643cccc..6563c390 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -117,6 +117,7 @@ importFrom(BiocGenerics,colnames) importFrom(BiocGenerics,combine) importFrom(BiocGenerics,rownames) importFrom(BiocGenerics,table) +importFrom(BiocGenerics,transform) importFrom(DBI,dbIsValid) importFrom(DelayedArray,DelayedArray) importFrom(EBImage,rotate) diff --git a/R/trans.R b/R/trans.R index 912c5bc0..2af78569 100644 --- a/R/trans.R +++ b/R/trans.R @@ -3,7 +3,7 @@ #' @title Transformations #' @aliases transform scale rotate translation flip flop mirror sequence #' -#' @param x,_data \code{SpatialData} element. +#' @param x \code{SpatialData} element. #' @param i scalar integer or string; target coordinate space. #' @param t transformation data; exceptions: for \code{mirror}, controls #' whether to perform \bold{v}ertical or \bold{h}orizontal reflection; @@ -48,13 +48,13 @@ #' y["shapes", c("rot", "wide", "left")] NULL +#' @importFrom BiocGenerics transform #' @export #' @rdname trans -setMethod("transform", "SpatialDataElement", \(`_data`, i=1, ...) { +setMethod("transform", "SpatialDataElement", \(x, i=1, ...) { stopifnot( length(i) == 1, is.character(i) | (is.numeric(i) && i == round(i))) - x <- `_data` if (is.character(i)) { i <- match.arg(i, CTname(x)) i <- match(i, CTname(x)) diff --git a/man/trans.Rd b/man/trans.Rd index 478652e9..447ec9a2 100644 --- a/man/trans.Rd +++ b/man/trans.Rd @@ -23,7 +23,7 @@ \alias{translation,SpatialDataFrame,numeric-method} \title{Transformations} \usage{ -\S4method{transform}{SpatialDataElement}(`_data`, i = 1, ...) +\S4method{transform}{SpatialDataElement}(x, i = 1, ...) \S4method{sequence}{SpatialDataElement,list}(x, t, ..., rev = FALSE) @@ -46,12 +46,12 @@ \S4method{translation}{SpatialDataFrame,numeric}(x, t, ...) } \arguments{ +\item{x}{\code{SpatialData} element.} + \item{i}{scalar integer or string; target coordinate space.} \item{...}{option arguments passed to and from other methods.} -\item{x, _data}{\code{SpatialData} element.} - \item{t}{transformation data; exceptions: for \code{mirror}, controls whether to perform \bold{v}ertical or \bold{h}orizontal reflection; no data is needed for \code{flip} (\bold{v}) and \code{flop} (\bold{h}).}