r - I'm getting an error when I try to replace NA with 0 -


mergedata large matrix, trying replace na 0 did "googling" , found code below not work because

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 i'm still not getting it. recommendations on how this?


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -