(a)To remove all rows with NA values, we use na.omit() function.
In your case:
final <- na.omit(dataframe)
Output:
a b c d e f
2 YASH00000199774 0 2 2 2 2
6 YASH00000221412 0 1 2 3 2
(b)To remove rows with NA by selecting particular columns from a data frame, we use complete.cases() function.
In your case:
dataframe[complete.cases(dataframe[ , 5:6]),]
Output:
a b c d e f
2 YASH00000199774 0 2 2 2 2
4 YASH00000207704 0 NA NA 1 2
6 YASH00000221412 0 1 2 3 2
If you want to explore more in R programming then watch this R programming tutorial for beginner: