Learn R Programming

rray (version 0.0.0.9000)

rray_det: Compute the determinant

Description

rray_det() computes the determinant of a matrix.

Usage

rray_det(x)

Arguments

x

A square matrix to compute the determinant for. Alternatively, a higher dimensional array which is treated as a stack of matrices computed from the first two dimensions.

Examples

Run this code
# NOT RUN {
x <- matrix(1:4, ncol = 2)

# Dimensions are kept
rray_det(x)

x_3d <- rray_broadcast(x, c(2, 2, 3))

# 3D matrices are treated as stacks of 2D matrices
rray_det(x_3d)

# }

Run the code above in your browser using DataLab