0

I have generate several regression models and store the outputs from the stargazer command. I am trying to save the output as a csv file with the follwoing command:

panel_1 <- stargazer(mod_1, mod_2, type = "text")
write.table(panel_1, file = "Panel 1.csv", sep = " ", quote = TRUE, row.names = F, col.names = F)

However when I open the csv file it is everyting in one cell, without any separation. I know the command is only applicable for LaTeX, but is it a way to save it as a csv file with the corresponding separation?

Thanks

  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Jun 24 '21 at 18:33

0 Answers0