Hi @jaiswal78 , remember put a reproducible example of data for better help you all the community.
Try with this:
Im make a toy data year21_22
year21_22 <- data.frame(A= c(1,2,NA,4,7),
B=c('amarillo',NA, 'rojo', NA, NA),
D=c(NA,NA,NA,NA,NA))
colSums(is.na(year21_22)
# NA in each column
# A B D
# 1 3 5
# For filter all rows with complete cases
year21_22_New=year21_22[complete.cases(year21_22),]
# A B D
# 1 amarillo 1