Check the following thread from a couple of years ago: http://www.mail-archive.com/r-help@r-project.org/msg14521.html cheers, -Girish -- View this message in context: http://r.789695.n4.nabble.com/Substitute-NAs-by-zero-tp2546715p2546725.html Sent from the R help mailing list archive at Nabble.com.