down <- nrow(airquality)
across <- ncol(airquality)
sum <- 0
print('The following rows have missing information: ')[1] "The following rows have missing information: "
for(i in 1:down){
for(j in 1:across){
if(is.na(airquality[i,j])){
sum <- sum + 1
print(i)
break}
}
}[1] 5
[1] 6
[1] 10
[1] 11
[1] 25
[1] 26
[1] 27
[1] 32
[1] 33
[1] 34
[1] 35
[1] 36
[1] 37
[1] 39
[1] 42
[1] 43
[1] 45
[1] 46
[1] 52
[1] 53
[1] 54
[1] 55
[1] 56
[1] 57
[1] 58
[1] 59
[1] 60
[1] 61
[1] 65
[1] 72
[1] 75
[1] 83
[1] 84
[1] 96
[1] 97
[1] 98
[1] 102
[1] 103
[1] 107
[1] 115
[1] 119
[1] 150
print(paste0('In total there are ', sum, ' rows with missing information.' ))[1] "In total there are 42 rows with missing information."