[R] Printing zero as dot

2003-04-04 Thread Giovanni Petris
I'm pretty sure I've seen some examples of a function printing zero entries in a matrix as dots, but I'm not able to find it now... Any suggestions...? Thanks in advance. (Of course, I might have dreamt of such a function...) Best, Giovanni --

Re: [R] Printing zero as dot

2003-04-04 Thread Sundar Dorai-Raj
Giovanni Petris wrote: I'm pretty sure I've seen some examples of a function printing zero entries in a matrix as dots, but I'm not able to find it now... Any suggestions...? Thanks in advance. (Of course, I might have dreamt of such a function...) Best, Giovanni I just so have something that

Re: [R] Printing zero as dot

2003-04-04 Thread Giovanni Petris
Many thanks to J.R. Lockwood and to Sundar Dorai-Raj for sending me their suggestions. I ended up using Sundar's function blended with a flavour of `zapsmall': print.matrix2 - function(x, zero = ., digits=getOption(digits), ...) { if (all(ina - is.na(x))) return(x) if