From jpr|t|k|n @end|ng |rom pobox@com  Wed Apr 24 12:29:47 2019
From: jpr|t|k|n @end|ng |rom pobox@com (Joshua N Pritikin)
Date: Wed, 24 Apr 2019 10:29:47 -0000
Subject: [Rd] improve matrix conformability error message
Message-ID: <20190329150516.GB22898-9220@cocoa>


Incorrect code,

A <- matrix(1, 2, 2)
B <- matrix(2, 3, 2)
A %*% B

Produces

  Error in A %*% B : non-conformable arguments

It would be helpful to show the matrix dimensions,

  Error in A %*% B : non-conformable arguments of dimensions (2, 2) and (3, 2)

-- 
Joshua N. Pritikin, Ph.D.
Virginia Institute for Psychiatric and Behavioral Genetics
Virginia Commonwealth University
PO Box 980126
800 E Leigh St, Biotech One, Suite 1-133
Richmond, VA 23219
http://exuberant-island.surge.sh



[Rd] improve matrix conformability error message
Joshua N Pritikin