Nothing
## -----------------------------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## -----------------------------------------------------------------------------
library(rray)
## -----------------------------------------------------------------------------
x <- array(1:12, dim = c(2, 3, 2))
x
## -----------------------------------------------------------------------------
rray_sum(x, axes = 1)
## -----------------------------------------------------------------------------
rray_sum(x, axes = 3)
## -----------------------------------------------------------------------------
axis <- 2
rray_dimensions(x)[[axis]]
## -----------------------------------------------------------------------------
rray_dimensions(x)
## -----------------------------------------------------------------------------
dim(1:5)
rray_dimensions(1:5)
## -----------------------------------------------------------------------------
rray_set_dimensions(1:6, c(2, 3))
## -----------------------------------------------------------------------------
rray_dimensions(x)
rray_dimensionality(x)
## -----------------------------------------------------------------------------
rray_dimensionality(1:5)
rray_dimensionality(matrix(1:6, nrow = 2))
## -----------------------------------------------------------------------------
dimensions <- rray_dimensions(x)
dimensionality <- rray_dimensionality(x)
axes <- seq_len(dimensionality)
for (axis in axes) {
dimension <- dimensions[[axis]]
print(dimension)
}
## -----------------------------------------------------------------------------
rray_dimensions(x)
2 * 3 * 2
rray_size(x)
## -----------------------------------------------------------------------------
length(x)
## -----------------------------------------------------------------------------
y <- rray_set_names(
x,
list(
c("a", "b"),
c("c", "d", "e"),
c("f", "g")
)
)
y
rray_names(y)
## -----------------------------------------------------------------------------
rray_axis_names(y, axis = 3)
## -----------------------------------------------------------------------------
rray_row_names(y)
rray_column_names(y)
## -----------------------------------------------------------------------------
rray_names(x)
## -----------------------------------------------------------------------------
z <- rray_set_titles(y, c("row", "col", "page"))
z
rray_titles(z)
## -----------------------------------------------------------------------------
rray_sum(z, axes = "col")
## -----------------------------------------------------------------------------
a <- matrix(1:6, nrow = 3)
a
b <- matrix(c(10L, 20L, 30L))
b
rray_add(a, b)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.