Learn R Programming

sparta (version 1.0.1)

sparta_unity_struct: Sparse unity table

Description

Construct a sparse table of ones

Usage

sparta_unity_struct(dim_names, rank = 1L)

Value

A sparta object

Arguments

dim_names

A named list of discrete levels

rank

The value of each element. Default is 1.

Examples

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

Run the code above in your browser using DataLab