inserting stargazer or xable table into knitr document

后端 未结 1 777
走了就别回头了
走了就别回头了 2020-12-17 00:30
> dput(head(t))
structure(list(Team = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = \"Union\", class = \"factor\"), 
    Date = structure(c(1L, 1L, 1L, 2L, 2L, 2L         


        
相关标签:
1条回答
  • 2020-12-17 01:05

    Do you mean something like this (results='asis')?

    \documentclass[11pt]{article}
    \begin{document}
    
    <<setup, echo = FALSE, results= 'hide', message = FALSE>>=
    data(mtcars)
    
    library(ggplot2)
    qplot(speed, dist, data = cars) + geom_smooth()
    @
    
    
    <<results='asis'>>=
    require(stargazer)
    stargazer(mtcars, summary = FALSE)
    @
    
    \end{document}
    
    0 讨论(0)
提交回复
热议问题