-
Notifications
You must be signed in to change notification settings - Fork 10
jsonlite::fromJSON -> Rarr::read_zarr_attributes #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e4762bd
39fd19f
a4b0edf
1e6092a
ec760b8
2375434
ba297fb
4585ab5
9b67c37
e6c2346
8eb6574
5169feb
3ee8ef2
0cff161
abc41a7
9b4a82a
2d3c166
2273744
a2bf8f5
1de8765
4ba3617
276f6ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,11 +11,11 @@ | |||||
| #' x <- system.file(x, package="SpatialData") | ||||||
| #' x <- readSpatialData(x, tables=FALSE) | ||||||
| #' | ||||||
| #' z <- meta(label(x)) | ||||||
| #' axes(z) | ||||||
| #' CTdata(z) | ||||||
| #' (z <- meta(label(x))) | ||||||
| #' | ||||||
| #' CTname(z) | ||||||
| #' CTtype(z) | ||||||
| #' CTdata(z, "scale") | ||||||
| #' | ||||||
| #' @export | ||||||
| Zattrs <- \(x=list()) { | ||||||
|
|
@@ -33,3 +33,44 @@ Zattrs <- \(x=list()) { | |||||
| #' @rdname Zattrs | ||||||
| #' @exportMethod $ | ||||||
| setMethod("$", "Zattrs", \(x, name) x[[name]]) | ||||||
|
|
||||||
| .showZattrs <- function(object) { | ||||||
| cat("class: Zattrs\n") | ||||||
| ax <- axes(object) | ||||||
| cat(sprintf("axes(%d):\n", length(ax))) | ||||||
| if (is.character(ax[[1]])) { | ||||||
| cat("- name:", unlist(ax), "\n") | ||||||
| } else { | ||||||
| cat("- name:", vapply(ax, \(.) .$name, character(1)), "\n") | ||||||
| cat("- type:", vapply(ax, \(.) .$type, character(1)), "\n") | ||||||
| } | ||||||
| cat(sprintf("coordTrans(%d):\n", n <- length(CTname(object)))) | ||||||
| g <- \(.) { | ||||||
| . <- paste(unlist(.), collapse=",") | ||||||
| if (!grepl(",", .)) return(.) | ||||||
| sprintf("[%s]", .) | ||||||
| } | ||||||
| f <- \(.) { | ||||||
| if (is.null(.)) return("") | ||||||
| paste0(":", g(lapply(., g))) | ||||||
| } | ||||||
| for (i in seq_len(n)) | ||||||
| cat(sprintf("- %s: (%s%s)\n", | ||||||
| CTname(object)[i], | ||||||
| CTtype(object)[i], | ||||||
| f(CTdata(object)[[i]][[CTtype(object)[i]]]))) | ||||||
|
||||||
| f(CTdata(object)[[i]][[CTtype(object)[i]]]))) | |
| f(CTdata(object, i)[[CTtype(object)[i]]]))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow no longer runs on pull requests because the
pull_request:trigger was removed. This will prevent CI from validating PRs before merge; re-add the PR trigger (or document why CI should only run on push).