Changed sentence in first example of for loop. Added note about NA values. Also changed for loop to iterate through the elements instead of using indexing.