Learn R Programming

nimble (version 0.6-6)

identityMatrix: Create an Identity matrix

Description

Returns a d-by-d identity matrix (square matrix of 0's, with 1's on the main diagnol).

Usage

identityMatrix(d)

Arguments

d

The size of the identity matrix to return, will return a d-by-d matrix

Value

A d-by-d identity matrix

Details

This function can be used in NIMBLE run code.

Examples

Run this code
# NOT RUN {
Id <- identityMatrix(d = 3)

# }

Run the code above in your browser using DataLab