3

I am using stargazer to output regresson tables in R. However, at the start of each table, the output says

% Table created by stargazer v.5.2.2 by Marek Hlavac, Harvard University.  
E-mail: hlavac at fas.harvard.edu  
% Date and time: Sat, Dec 19, 2020 - 14:45:37  

Is it possible to get rid of this?

Rui Barradas
  • 70,273
  • 8
  • 34
  • 66
Han
  • 41
  • 3
  • If I run `stargazer::stargazer(lm(mpg ~ am + hp, data=mtcars), type='html')` I am not getting anything like that. what you are running here , can you share your code? (This is just a dummy example, not meant to be used). the point is that I am not getting the citation part – PKumar Dec 19 '20 at 14:57
  • ```{r, results='asis'} stargazer(attitude) ``` – Han Dec 19 '20 at 17:25
  • If I run that and knit it to a pdf it comes up – Han Dec 19 '20 at 17:25
  • 2
    @Megan When you call `stargazer` function add `header = FALSE` to it: `stargazer(attitude, header = FALSE)` – Ben Dec 19 '20 at 20:25
  • That worked, thank! – Han Dec 21 '20 at 18:21

1 Answers1

1

This is quite easy to fix!

Try the following:

```{r, message = FALSE, warning = FALSE, results = 'asis'}

library(stargazer)

linear <- lm(x ~ y)
stargazer(linear, header = FALSE)

```

The linear model is just for the sake of illustration.

Dharman
  • 30,962
  • 25
  • 85
  • 135