🌈 搜索
📅  最后修改于: 2022-03-11 14:52:01.582000             🧑  作者: Mango
a = data.frame(a=c(NA,1,2,NA), b=c(1,1,2,NA),c=c(NA,NA,2,NA)) for (i in 1:3){ a[which(is.na(a[,i])),i] = 0 }