You should be able to get what you want with:
library(stargazer)
stargazer(lm.out, type = "html", title = "Write your title here.")
You can do so much more with the package and I suggest you read a good tutorial on how to use it. Other notable packages for making regression tables are:
-
the
finalfit
package: https://www.datasurg.net/2018/05/16/elegant-regression-results-tables-and-plots-the-finalfit-package/ -
the
sjPlot
package: https://strengejacke.github.io/sjPlot/index.html