as_q_matrix: Coerce 'data.frame' and 'matrix' classes to Q Matrix.

Description Usage Arguments Value See Also Examples

View source: R/q-matrix.R

Description

as.q_matrix acts as an aliases.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
as_q_matrix(x, ...)

## S3 method for class 'data.frame'
as_q_matrix(x, ...)

## S3 method for class 'matrix'
as_q_matrix(x, ...)

## Default S3 method:
as_q_matrix(x, ...)

Arguments

x

Either a data.frame or matrix.

...

Not used

Value

A q_matrix object.'

See Also

q_matrix()

Examples

1
2
3
4
5
# Q matrix values
x = matrix(c(1, 0, 0, 1), nrow = 2)

# Construct class
q_mat = as_q_matrix(x)

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