struc-class: Class to Represent Scalar, Vector, or Matrix Structure

struc-classR Documentation

Class to Represent Scalar, Vector, or Matrix Structure

Description

The simplest way to create such objects is with the struc function.

Usage

## S4 method for signature 'struc,struc'
e1 * e2

## S4 method for signature 'struc,struc'
e1 + e2

## S4 method for signature 'struc,struc'
x %*% y

## S4 method for signature 'struc,struc'
kronecker(X, Y)

## S4 method for signature 'struc'
t(x)

## S4 method for signature 'struc'
sum(x, ..., na.rm = FALSE)

## S4 method for signature 'struc'
prod(x, ..., na.rm = FALSE)

## S4 method for signature 'struc'
rowSums(x, na.rm = FALSE, dims = 1L)

## S4 method for signature 'struc'
colSums(x, na.rm = FALSE, dims = 1L)

## S4 method for signature 'struc'
dim(x)

Methods (by generic)

  • *: 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

Slots

v

character vector giving the expressions for each element of the matrix structure object

dims

numeric vector giving the dimensions of the matrix structure object


bbolker/McMasterPandemic documentation built on Aug. 25, 2024, 6:35 p.m.