Plotting sparklines in R

I would like to use R to plot out something like this:

Something like this

It would seem possible but highly complex to keep track of the coordinates, width, height, etc. Intuitively it would seem best to treat each cell as a new plot and transform the coordinates for each cell. Is there a way to do this in R?

thanks!

Answer

I initially managed to produce something approaching your original picture with some quick and dirty R code (see this gist), until I discovered that the sparkTable package should do this very much better, provided you are willing to use LATEX. (In the meantime, it has also been pointed out by @Bernd!)

Here is an example, from help(sparkEPS):

enter image description here

It should not be too difficult to arrange this the way you want.

Attribution
Source : Link , Question Author : Ming K , Answer Author : chl

Leave a Comment