R Package that Converts Various R Models to Latex Syntax
The idea comes from the final project of my regression class (STAT 462), where our dataset contains more than 60 predictors, and we have to fit 24 of them to the regression model. When completing the presentation as well as the report, we felt it was so annoying and boring for translating the model to latex code by hand because we did so much typing, copying, and pasting. Therefore, I developed this simple r package afterward to do all the work by one line of simple code.
If you’re using r studio, follow the code below to install this package.
install.packages("devtools")
library(devtools)
devtools::install_github("SecantZhang/rmodel2tex")
library(rmodel2tex)
Name | Description | Primary Function | Code in this package |
---|---|---|---|
Linear Models | Linear regression | lm( ) | lm2tex(model, type, round_num) |
Logistic Regression Model | Logistic Regression | glm( ) | glm2tex(glm_model, glm_type, glm_form, glm_round_num) |
lm2tex(model, type, round_num)