Guest User

Untitled

a guest
Nov 18th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. install.packages("devtools")
  2. library(devtools)
  3. install_github("ChandlerLutz/starpolishr");library(starpolishr)
  4.  
  5. la<-latex(mtcars[1:2,1:5],file="example.tex",caption = "table using caption",
  6. where="!htbp")
  7. file0<-readLines("example.tex")
  8. file0<-star_notes_tex(file0, note = "file using caption*")
  9. cat(file0, file = paste0(getwd(),"/file0.tex"),sep="n")
  10.  
  11. mt <- mtcars[1:2,1:5]
  12. mt[1,1]<-paste0(mt[1,1],"\tnote{1}")
  13. la<-latex(mt,file="example1.tex",label=" ",caption="table using threeparttable",
  14. where="!htbp")
  15. file1<-readLines("example1.tex")
  16. file1<-star_notes_tex(file1, note.type = "threeparttable",
  17. note = "\item[1] notes with threeparttable : For this example you must use both label and caption, the
  18. threepartable code is meant to be used with tables generated by
  19. stargazer where a row with label is present. Otherwise the threepart table
  20. argument is badly positionned.")
  21. cat(file1, file = paste0(getwd(),"/file1.tex"),sep="n")
Add Comment
Please, Sign In to add comment