diag_like: Create an identity matrix matching a vector

Description Usage Arguments Value Examples

View source: R/arrays.R

Description

Create an identity matrix matching a vector

Usage

1

Arguments

x

A vector

Value

An identity matrix with the same dimension as x.

Examples

1
diag_like(1:2)

alexpghayes/hayeslib documentation built on May 5, 2019, 4:47 p.m.