This function creates a index slot label specification. Any R symbol
can serve as a label. .()
is typically used in conjunction with
%_%.
Arguments
- ...
Index labels separated by commas optionally prefixed by "+" and "-"
to indicate the index position (upper and lower respectively).
If no prefix is provided, a lower index ("-") is assumed.
This argument uses non-standard evaluation: any R symbol
that is not a reserved keyword can be used.
Value
A named list of two character vectors representing the
index label names and index position.
Examples
# three lower index slots
.(i, j, k)
#> $i
#> [1] "i" "j" "k"
#>
#> $p
#> [1] "-" "-" "-"
#>
#> attr(,"class")
#> [1] "tensor_indices"
# one lower and upper index
.(i, +j)
#> $i
#> [1] "i" "j"
#>
#> $p
#> [1] "-" "+"
#>
#> attr(,"class")
#> [1] "tensor_indices"