The simplest way to create such objects is with the struc
function.
# S4 method for struc,struc
*(e1, e2)
# S4 method for struc,struc
+(e1, e2)
# S4 method for struc,struc
%*%(x, y)
# S4 method for struc,struc
kronecker(X, Y)
# S4 method for struc
t(x)
# S4 method for struc
sum(x, ..., na.rm = FALSE)
# S4 method for struc
prod(x, ..., na.rm = FALSE)
# S4 method for struc
rowSums(x, na.rm = FALSE, dims = 1L)
# S4 method for struc
colSums(x, na.rm = FALSE, dims = 1L)
# S4 method for struc
dim(x)*: Elementwise or scalar multiplication
+: Elementwise or scalar addition
%*%: Matrix multiplication
kronecker: Kronecker product
t: Matrix or vector transpose
sum: Sum of vector or matrix elements
prod: Product of vector or matrix elements
rowSums: Row sums of matrices
colSums: Column sums of matrices
dim: Dimensions of a matrix
vcharacter vector giving the expressions for each element of the matrix structure object
dimsnumeric vector giving the dimensions of the matrix structure object