1

I'm trying to export etable() output to word but it seems like it only outputs to latex, any tips?

library(fixest)
lms<-feols(mpg~csw0(cyl,disp,hp),mtcars)

etable(lms)
bretauv
  • 7,756
  • 2
  • 20
  • 57
EconMatt
  • 339
  • 2
  • 7

1 Answers1

1

etable() cannot export to Word but modelsummary can:

library(fixest)
library(modelsummary)
library(flextable)

lms <- feols(mpg~csw0(cyl, disp, hp), mtcars)

names(lms) <- rep("mpg", 4)

# If you want the table as-is:
# modelsummary(lms, stars = TRUE, output = "table.docx") 

# if you want to customize the table with `flextable`
modelsummary(lms, stars = TRUE, output = "flextable") |> 
  autofit() |> 
  save_as_docx(path = "table.docx")

enter image description here

bretauv
  • 7,756
  • 2
  • 20
  • 57