
Last chance! 50% off unlimited learning
Sale ends in
Low level constructor for rray objects
new_rray(.data = numeric(0), size = 0L, shape = integer(0),
dim_names = NULL, ..., subclass = character(0))
A numeric vector with no attributes representing the data.
An integer. The number of observations in the object. This is equivalent to the number of rows.
An integer vector. The shape corresponds to all of the
dimensions in the object except for the first one (the size
).
A list. For no names, NULL
, in which case a list of
empty characters will be constructed. Otherwise the list must
be the same length as the total number of dimensions
(i.e length(c(size, shape))
). Each element of the list much be either
a character vector the same size as the corresponding dimension, or
character(0)
for no names for that dimension.
Name-value pairs defining attributes.
The name of the subclass.
# NOT RUN {
rray_ex <- new_rray(
.data = 1:10,
size = 5L,
shape = 2L,
dim_names = list(character(), c("a", "b"))
)
rray_ex
# }
Run the code above in your browser using DataLab