Learn R Programming

sparta (version 1.0.1)

as_array: As array

Description

Turn a sparse table into an array

Usage

as_array(x)

# S3 method for sparta as_array(x)

# S3 method for sparta_unity as_array(x)

Value

An array

Arguments

x

sparta object

See Also

as_array

Examples

Run this code
x <- array(
  c(1,0,0,2,3,4,0,0),
  dim = c(2,2,2),
  dimnames = list(
    a = c("a1", "a2"),
    b = c("b1", "b2"),
    c = c("c1", "c2")
  )
)

as_array(as_sparta(x))

Run the code above in your browser using DataLab