Skip to content
Prev 378261 / 398502 Next

Printing a list of simultaneous equations

John-

Don't try to forge a new wheel, when you can get one ready made
and it might fit your wagon.

Check out the `matlib` package on CRAN and devel on github: 
https://github.com/friendly/matlib

install.packages("matlib")
library(matlib)
A <- matrix(c(1,2,3, -1, 2, 1), 3, 2)
b <- c(2,1,3)
showEqn(A, b)

 > showEqn(A, b)
1*x1 - 1*x2  =  2
2*x1 + 2*x2  =  1
3*x1 + 1*x2  =  3
 >
sound like what you want.  Various vignettes illustrate this, also 
showing how to plot linear equations in 2D, 3D.

browseVignettes("matlib")
On 1/18/2019 7:02 AM, Sorkin, John wrote: