sparta_unity_struct {sparta}R Documentation

Sparse unity table

Description

Construct a sparse table of ones

Usage

sparta_unity_struct(dim_names, rank = 1L)

Arguments

dim_names

A named list of discrete levels

rank

The value of each element. Default is 1.

Value

A sparta object

Examples

s <- sparta_unity_struct(list(a = c("a1", "a2"), b = c("b1", "b2")), rank = 1)
mult(s, 2)

[Package sparta version 0.8.4 Index]