📜  用 na 查找行 - R 编程语言代码示例

📅  最后修改于: 2022-03-11 14:51:59.052000             🧑  作者: Mango

代码示例1
# Never use =='NA' to test for missing values. Use is.na() instead. This should do it:
new_DF <- DF[rowSums(is.na(DF)) > 0,]

# or in case you want to check a particular column, you can also use
new_DF <- DF[is.na(DF$Var),]

#In case you have NA character values, first run
Df[Df=='NA'] <- NA