2

Just learned about sparktable and went over few documents about it. I was wondering if it can be used with knitr and rmarkdown to produce a PDF document that embed sparktable?

Also, I noticed plotSparkTable() used in many examples, but it does not exist in the latest version 1.0 and it does exist in 0.9. Is there a replacement plotSparkTable()?

Richard Erickson
  • 2,568
  • 8
  • 26
  • 39
user2103970
  • 703
  • 3
  • 9
  • 15

1 Answers1

3

See "sparkTable: Generating Graphical Tables for Websites and Documents with R" for examples of how to use sparkTable with knitr. Here's an example from the article:

```{r , echo = TRUE }
require ( sparkTable )
sl <- newSparkLine ( values = rnorm (25) , lineWidth = .18 , pointWidth = .4 ,
width = .4 , height = .08)
export ( sl , outputType = " png " , filename = " sparkLine ")
```
This is a sparkline included in the ![ firstSparkLine ]( sparkLine . png )
text ...

export() is the replacement for plotSparkTable()

Richard Erickson
  • 2,568
  • 8
  • 26
  • 39
rgandhi
  • 31
  • 2
  • Is there an example of "export()" for newSparkTable with knitr and rmarkdown that embed an newSparkTable into a PDF? – user2103970 Aug 18 '15 at 05:40