sym: Symmetric tensor part

symR Documentation

Symmetric tensor part

Description

Takes the symmetric tensor part of a tensor x with respect to the specified indices .... An error is thrown if the specified indices do not exist.

Usage

sym(x, ...)

Arguments

x

A labeled tensor object, created by %_% or tensor().

...

Any number of index expressions. The indices need to occur in x.

Value

A modified tensor object.

See Also

Wikipedia: Ricci calculus - Symmetric and antisymmetric parts

Other tensor operations: Ops.tensor(), asym(), kron(), l(), r(), subst()

Examples

a <- array(1:4, dim = c(2, 2))
a %_% .(i, j) |> sym(i, j)

ricci documentation built on Sept. 9, 2025, 5:56 p.m.