I am trying to modify some code that I found in one of the answers on this post:
Extract Formula From lm with Coefficients (R)
AlexB p