Learn R Programming

CVXR (version 1.9.1)

intf_convert: Convert a value to a numeric matrix or sparse matrix

Description

Normalizes R values so the rest of CVXR can assume a consistent type. Scalars -> 1x1 matrix, vectors -> column matrix, logical -> numeric. Sparse matrices are kept sparse.

Usage

intf_convert(val)

Value

A matrix or dgCMatrix

Arguments

val

A numeric scalar, vector, matrix, or Matrix object