将具有NA值的行删除
2023-09-04 本文已影响0人
月底花
-
fragCount1 <- fragCount[!(rowSums(is.na(fragCount))),]
is.na()会导出TRUE,FALSE,rowSums会计算每行,TRUE=1,FALSE=0。 -
fragCount2 <- na.omit(fragCount)
暴力删除
fragCount1 <- fragCount[!(rowSums(is.na(fragCount))),]fragCount2 <- na.omit(fragCount)