Re: [R] shading cells in a latex table by value

2014-07-23 Thread Michael Friendly
Thanks, Duncan That's quite lovely, and makes me appreciate the tables package even more, so I'll have to study your details. The more general version of this idea is that rendering values in a latex table with visual attributes (background color, font color, font family, font shape, font weight)

Re: [R] shading cells in a latex table by value

2014-07-23 Thread Duncan Murdoch
On 23/07/2014, 9:31 AM, Michael Friendly wrote: > I want to create latex tables of values where the cell background is > shaded according to the > table value. For example: > > set.seed(1) # reproducibility > mat <- matrix(3 * rnorm(12), 3, 4) > rownames(mat) <- letters[1:3] > colnames(mat) <- L

[R] shading cells in a latex table by value

2014-07-23 Thread Michael Friendly
I want to create latex tables of values where the cell background is shaded according to the table value. For example: set.seed(1) # reproducibility mat <- matrix(3 * rnorm(12), 3, 4) rownames(mat) <- letters[1:3] colnames(mat) <- LETTERS[1:4] > round(mat,1) AB CD a -1.9 4.8 1.