Producing tables in LaTeX might be a difficult task as we can not just copy and paste a table in the editor; we have to write all the numbers and other codes. But with the help of xtable package of R it is possible to produce all the necessary codes for producing table in LaTeX and also possible to export the codes in a tex file. Suppose we have produced summary statistics for Air Pollution Data and now want to export it to a tex file as a tabular format. Here are the codes-
library(xtable)
data<-read.table("data_air.txt", header=T)
data<-data[,1:4]
s<-summary(data)