matlib::showEqn error

Are you putting it in a math environment?

The display of your error is messed up, you needed to paste it in a verbatim environment to maintain the formatting and special characters.

I believe the issue is your array needs to be inside a LaTeX environment for displaying mathematics.

A code chunk can't be nested inside of a display environment like that, so I told you to use an inline R reference. You still need to create the environment for it to sit in.

So, the complete line should probably look like this,

$`r showEqn(A1, b, latex = TRUE)`$