Re: [R] grid.table + splom: how to nicely align panel entries

2011-04-21 Thread Marius Hofert
Here is the final solution with my minimal example :-) library(lattice) library(grid) library(gridExtra) ## function for correct alignment according to the decimal point align.digits <- function(l){ sp <- strsplit(as.character(l), "\\.") chars <- sapply(sp, function(x) nchar(x)[1]) n

Re: [R] grid.table + splom: how to nicely align panel entries

2011-04-20 Thread Marius Hofert
Dear Baptiste, *fantastic*, thank you very much, *precisely* what I was looking for! Cheers, Marius On 2011-04-21, at 01:31 , baptiste auguie wrote: > On 21 April 2011 09:54, Marius Hofert wrote: >> Dear Baptiste, >> >> great, many thanks! >> One last thing: Do you know why the gpar(cex=0.1)

Re: [R] grid.table + splom: how to nicely align panel entries

2011-04-20 Thread baptiste auguie
On 21 April 2011 09:54, Marius Hofert wrote: > Dear Baptiste, > > great, many thanks! > One last thing: Do you know why the gpar(cex=0.1) argument is ignored? > Yes – the theme overrides it, you need to include it in the theme.list(). baptiste > Cheers, > > Marius > > library(lattice) > librar

Re: [R] grid.table + splom: how to nicely align panel entries

2011-04-20 Thread Marius Hofert
Dear Baptiste, great, many thanks! One last thing: Do you know why the gpar(cex=0.1) argument is ignored? Cheers, Marius library(lattice) library(grid) library(gridExtra) ## function for correct digit alignment align.digits <- function(l){ sp <- strsplit(as.character(l), "\\.") chars

Re: [R] grid.table + splom: how to nicely align panel entries

2011-04-20 Thread baptiste auguie
Try this, align.digits = function(l) { sp <- strsplit(as.character(l), "\\.") chars <- sapply(sp, function(x) nchar(x)[1]) n = max(chars) - chars l0 = sapply(n, function(x) paste(rep("0", x), collapse="")) labels = sapply(seq_along(sp), function(i) { point <- if(is.na(sp[[i]][2])) NULL else quo

Re: [R] grid.table + splom: how to nicely align panel entries

2011-04-20 Thread Marius Hofert
Dear Baptiste, very nice, indeed! Two minor issues that remain, are: (1) I tried to omit the decimal dot for those numbers that do not have digits after the decimal dot. But somehow it does not work... (2) Do you know how one can decrease the text size for the text appearing in the lo

Re: [R] grid.table + splom: how to nicely align panel entries

2011-04-20 Thread baptiste auguie
On 20 April 2011 21:16, Marius Hofert wrote: > Dear expeRts, > > is there a way to get the entries in each panel correctly aligned according > to the > equality signs? > > Here is the "wish-list": > (1) the equality signs in each panel should be vertically aligned You can put the equal signs in

[R] grid.table + splom: how to nicely align panel entries

2011-04-20 Thread Marius Hofert
Dear expeRts, is there a way to get the entries in each panel correctly aligned according to the equality signs? Here is the "wish-list": (1) the equality signs in each panel should be vertically aligned (2) the numbers should be aligned on the decimal point One could adjust the phantom()-ar