How to export Latex table to PDF in R? -


i produced table in r , used hmisc:latex convert latex, not sure how render latex result pdf table. here code:

 latex(tabular((preoculars +postoculars +   loreals+ventral.scale+dorsal.scale.a+head.width+head.length+  temporals+supralabials+infralabials+subcaudals+dorsal.scale.b+dorsal.scale.c+   svl+tail.length+number.of.rings+sl) ~   ((subspecies)*((n=1) +mean+sd)), data=dat)) 

it depends on workflow - using rmarkdown, inside of rstudio, once have latex installed, can use (nb i'm using example data) .rmd file:

--- output: pdf_document ---  ```{r, results ='asis'} library(hmisc) library(tables) latex(tabular((species + 1) ~ (n=1) + format(digits=2)*              (sepal.length + sepal.width)*(mean + sd), data=iris)) ``` 

then click convert pdf.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -