MergeData
is a very large matrix, I am trying to replace Na
with 0
I did some "googling" and found that the code below would do that but it does not work because I get
MergedData[is.na(MergedData)] <- 0
Warning message:
In `[<-.factor`(`*tmp*`, thisvar, value = 0) :
invalid factor level, NA generated
Further research had me doing for
loops but I'm still not getting it.
Any recommendations on how to do this?