q_matrix: Create a Q Matrix Object

Description Usage Arguments Value See Also Examples

View source: R/q-matrix.R

Description

Provides a way to create an object as a "q_matrix".

Usage

1

Arguments

x

Either a data.frame or matrix.

Value

A q_matrix object.

See Also

as_q_matrix()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Q matrix values
x = matrix(c(1, 0, 0, 1), nrow = 2)

# Q matrix wrapper
q_mat = q_matrix(x)

# Data Frame encoding of Q
q_df = data.frame(
   k1 = c(1, 0),
   k2 = c(0, 1)
)

# Create a Q matrix
q_mat = q_matrix(q_df)

edina documentation built on March 26, 2020, 9:30 p.m.