rray_dot: Matrix multiplication

Description Usage Arguments Details Value Examples

View source: R/dot.R

Description

rray_dot() works exactly like the base R function, %*%, but preserves the rray class where applicable. For the exact details of how 1D objects are promoted to 2D objects, see %*%.

Usage

1
rray_dot(x, y)

Arguments

x, y

Arrays or rrays that are either 1D or 2D.

Details

Due to some peculiarities with how %*% dispatches with S3 objects, calling %*% directly with an rray will compute the matrix multiplication correctly, but the class will be lost. rray_dot() ensures that the rray class is maintained.

Value

The result of the matrix multiplication of x and y. See %*% for the exact details. The common type of x and y will be preserved.

Examples

1
2
3
rray_dot(1:5, 1:5)

rray_dot(rray(1:5), 1:5)

rray documentation built on July 23, 2019, 5:04 p.m.