I have an lm object and want to get the formula extracted with coefficients. I know how to extract the formula without coefficients, and how to get the coefficients without
as.formula( paste0("y ~ ", round(coefficients(model)[1],2), " + ", paste(sprintf("%.2f * %s", coefficients(model)[-1], names(coefficients(model)[-1])), collapse=" + ") ) ) # y ~ -5.33 + 0.51 * b