How to replace all NA rows of a column with 0, using if and for loops in R?

后端 未结 0 1021
无人及你
无人及你 2021-02-12 11:49

My code:

for (i in HVData_length(1)){
  if (is.na(ch4[i,])== TRUE){
   ch4[is.na(ch4[i,])] == "0"
  }
 }

If I try it with just 0, I get

相关标签:
回答
  • 消灭零回复
提交回复
热议问题