Displaying 1 result from an estimated 1 matches for "rnormcor".
2007 Oct 05
4
Replacing NA values when building matrix using tapply
Hi,
I'm building a matrix m from a data frame d which includes the matrix row,
column and value.
This works well enough:
m <- tapply(d[,"value"],d[,c("row","column")],c)
However, I'd like to replace any missing values with 0, not NA. The
obvious doesn't work, however:
m <-