开发者

Generating batch custom reports using Sweave & LaTeX

I am working on creating some personalized reports using Latex and Sweave. I need to generate the reports in a batch (the dataset has about 300,000+ rows). I have come across several methods on the web for doing this but am looking for suggestions on a simple straightforward method.

The data frame has several rows containing the names of Cars and associated values such as,

Date  CarName    NumSold     NumUnsold     MostPaid  LeastPaid           Model ....
09/04 Honda           10            20        50000      10000          Accord ....
09/06 Audi             5            30       100000      30000              A4 ....
09/05 Honda           12            20        50000      10000          Accord ....
09/06 Honda           18            27        53000      60000          Accord ....
09/08 Toyota          12            20        50000      10000           Camry ....
...

Suppose there are 400 different types of Cars we get from (unique(df$CarName))

I need to create a nice looking LaTeX report for each of these 400 Types of Cars with specific data such as say, LeastPaid for by date, NumSold by Date, by Model etc etc ... using table, apply, reshape, etc etc. The in开发者_如何学Godividual reports will also contain images

My question is with how to generate the reports in a batch. I can create the Sweave Rnw for a single CarName, but need to create the same for the 399 other Cars also and save them with some unique name like CarName-Date.tex.


You can do this using Sweave or the brew package. I will try to post a short example if I find time, but here are two great resources available that provide very detailed instructions on how to go about it.

  1. brew:Creating Repetitive Reports
  2. Batch Individual Personality Reports Using R, Sweave and Latex
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜