Create a Layers object
Methods
Method print()
Print Layers object
Examples
\dontrun{
ad <- AnnData(
X = matrix(c(0, 1, 2, 3), nrow = 2),
obs = data.frame(group = c("a", "b"), row.names = c("s1", "s2")),
var = data.frame(type = c(1L, 2L), row.names = c("var1", "var2")),
layers = list(
spliced = matrix(c(4, 5, 6, 7), nrow = 2),
unspliced = matrix(c(8, 9, 10, 11), nrow = 2)
)
)
print(ad$layers)
}
Examples
if (FALSE) { # \dontrun{
ad <- AnnData(
X = matrix(c(0, 1, 2, 3), nrow = 2),
obs = data.frame(group = c("a", "b"), row.names = c("s1", "s2")),
var = data.frame(type = c(1L, 2L), row.names = c("var1", "var2")),
layers = list(
spliced = matrix(c(4, 5, 6, 7), nrow = 2),
unspliced = matrix(c(8, 9, 10, 11), nrow = 2)
)
)
ad$layers["spliced"]
ad$layers["test"] <- matrix(c(1, 3, 5, 7), nrow = 2)
length(ad$layers)
names(ad$layers)
} # }
## ------------------------------------------------
## Method `LayersR6$print`
## ------------------------------------------------
if (FALSE) { # \dontrun{
ad <- AnnData(
X = matrix(c(0, 1, 2, 3), nrow = 2),
obs = data.frame(group = c("a", "b"), row.names = c("s1", "s2")),
var = data.frame(type = c(1L, 2L), row.names = c("var1", "var2")),
layers = list(
spliced = matrix(c(4, 5, 6, 7), nrow = 2),
unspliced = matrix(c(8, 9, 10, 11), nrow = 2)
)
)
print(ad$layers)
} # }