gridExtra Colour different rows with tableGrob <p>I have a question regarding tableGrob/grid.table from the gridExtra package. Using the regular parameter settings, it is straightforward to colour alternate rows. However, I was hoping that it might be feasible to get a bit more control over the colouring of the rows. For example, is it possible to colour every <em>third</em> row in a different colour? I suspect the grid.edit function is one way to approach this, judging by the example in this link: <a href="http://code.google.com/p/gridextra/wiki/tableGrob" rel="nofollow noreferrer">http://code.google.com/p/gridextra/wiki/tableGrob</a> but I can't figure out how to apply that to my question.</p> <p>I believe the person who posted this question had the same in mind. <a href="http://stackoverflow.com/questions/15756052/table-with-rows-of-different-colors-with-tablegrob">Table with rows of different colors with tableGrob</a></p> <p>I am currently stuck with R 2.13 due to compatibility issues, so if there are any suggestions which don't involve later versions that would be ideal.</p> <p>Example code:</p> <pre><code>library(gridExtra) grid.table(mtcars[1:10, ], gpar.coretext = gpar(fontsize = 10), gpar.corefill = gpar(fill = "lightblue", alpha=0.5, col = NA), h.even.alpha = 0.5 ) </code></pre> <p><img src="https://i.stack.imgur.com/1sVAN.png" alt="example table"></p>