grapes-outer-grapes function

Numerical and Symbolic Outer Product

Numerical and Symbolic Outer Product

Computes the outer product of two numeric or character arrays.

x %outer% y

Arguments

  • x: numeric or character array.
  • y: numeric or character array.

Returns

array.

Details

The outer product between two arrays A and B is computed as:

Ci1imj1jn=Ai1imBj1jn C_{i_1\dots i_mj_1\dots j_n} = A_{i_1\dots i_m}B_{j_1\dots j_n}

Examples

### numeric outer product c(1,2) %outer% c(2,3) ### symbolic outer product c("a","b") %outer% c("c","d")

References

Guidotti E (2022). "calculus: High-Dimensional Numerical and Symbolic Calculus in R." Journal of Statistical Software, 104(5), 1-37. tools:::Rd_expr_doi("10.18637/jss.v104.i05")

See Also

Other basic arithmetic: %diff%(), %div%(), %dot%(), %inner%(), %kronecker%(), %prod%(), %sum%()

  • Maintainer: Emanuele Guidotti
  • License: GPL-3
  • Last published: 2023-03-09