Hi. I'm writing a print method for an object that includes a numeric matrix for which the lower diagonal elements are not meaningful. So I make the lower diagonal of my matrix NA and print it.
But my co-author does not like NA there and wants a dash. I have tried coercing the matrix to character, essentially by M[is.na(M)] <- "-" but this interferes with the pleasing column alignment for numerical matrices. How do I make R print "-" instead of "NA" for NA entries in a numeric matrix, without altering the vertical alignment? Is there such a command as options(NA_string = "-") available? best wishes Robin Hankin ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel