Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

find row with na r

# 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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #row #na
ADD COMMENT
Topic
Name
1+9 =