Skip to content

Commit b35642d

Browse files
committed
Merge branch 'main' into rmv_arrow
2 parents 415ddef + 39f0080 commit b35642d

7 files changed

Lines changed: 12 additions & 24 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: SpatialData
22
Title: Representation of Python's SpatialData in R
33
Depends: R (>= 4.6)
4-
Version: 0.99.37
4+
Version: 0.99.38
55
Description: R interface to Python/scverse's 'spatialdata' framework for
66
unified spatial omics data handling. Adheres to OME-NGFF standards,
77
providing lazy, on-disk representations for multiscale images and

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ importFrom(sf,st_bbox)
202202
importFrom(sf,st_centroid)
203203
importFrom(sf,st_coordinates)
204204
importFrom(sf,st_geometry_type)
205+
importFrom(sf,st_point)
205206
importFrom(sf,st_polygon)
206207
importFrom(sf,st_sf)
207208
importFrom(sf,st_sfc)

R/SpatialData.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#'
44
#' @aliases data meta
55
#' @aliases layer element element<-
6-
#' @aliases image label point shape table,ANY-method
6+
#' @aliases image label point shape table
77
#' @aliases images labels points shapes tables
88
#' @aliases image<- label<- point<- shape<- table<-
99
#' @aliases images<- labels<- points<- shapes<- tables<-

R/methods.R

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ for (. in one) eval(f(.), parent.env(environment()))
230230
# get one ----
231231

232232
#' @name SpatialData
233-
#' @exportMethod image label point shape
233+
#' @importFrom BiocGenerics table
234+
#' @exportMethod image label point shape table
234235
NULL
235236

236237
.get <- \(y, i) {
@@ -249,24 +250,8 @@ NULL
249250
y[[i]]
250251
}
251252

252-
#' @export
253-
#' @name SpatialData
254-
#' @importFrom BiocGenerics table
255-
setMethod("table", "ANY", \(...) {
256-
l <- list(...)
257-
if (!is(l[[1]], "SpatialData"))
258-
return(base::table(...))
259-
n <- length(l)
260-
i <- if (n == 1) 1 else l[[2]]
261-
m <- length(i)
262-
if (n > 2 || m > 1)
263-
stop("too many arguments")
264-
y <- l[[1]]$tables
265-
.get(y, i)
266-
})
267-
268253
.set <- \(.) setMethod(., "SpatialData", \(x, i=1) .get(x[[paste0(., "s")]], i))
269-
for (. in setdiff(one, "table")) eval(.set(.), parent.env(environment()))
254+
for (. in one) eval(.set(.), parent.env(environment()))
270255

271256
# set all ----
272257

R/sdFrame.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ NULL
7474

7575
# new ----
7676

77-
#' @importFrom sf st_sf st_sfc st_as_sf st_polygon
77+
#' @importFrom sf st_sf st_sfc st_as_sf st_point st_polygon
7878
.df_to_sf <- \(data, type=c("POINT", "POLYGON")) {
7979
type <- match.arg(type)
8080
if (is.null(data) || isTRUE(nrow(data) == 0)) {

inst/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
changes in version 0.99.38
2+
3+
- use BiocGenerics::table
4+
15
changes in version 0.99.37
26

37
- fix note regarding internal '.mask' generic

man/SpatialData.Rd

Lines changed: 1 addition & 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)