Look at the structure and names of the variables included in the table names(birdFluDeaths) head(birdFluDeaths) str(birdFluDeaths) summary(birdFluDeaths)`
Country with highest number of Bird Flu deaths in 2005
#find the row with the maximum number of bird flu deaths in 2005hiDeaths05 =which(birdFluDeaths$yr2005 ==max(birdFluDeaths$yr2005))print(hiDeaths05)
[1] 15
#using the row number with the highest deaths in 2005, find the name of the country using index notationhiDeath05Co = birdFluDeaths[15,1] #print out the name of the country that had the highest number of bird flu deaths in 2005print(hiDeath05Co)
[1] "Vietnam"
According to the data table, the country with the highest number of deaths from Bird Flu in 2005 was Vietnam
Country with highest number of Bird Flu deaths in 2007
#find the row with the maximum number of bird flu deaths in 2007hiDeaths07 =which(birdFluDeaths$yr2007 ==max(birdFluDeaths$yr2007)) print(hiDeaths07)
[1] 7
#using the row number with the highest deaths in 2007, find the name of the country using index notationhiDeath07Co = birdFluDeaths[7,1] #print out the name of the country that had the highest number of bird flu deaths in 2007print(hiDeath07Co)
[1] "Indonesia"
According to the data table, the country with the highest number of deaths from Bird Flu in 2005 was Indonesia