Question: In the image below, the data frame on lines 1 through 4 is named StDf. State and Capital are both factors. Which statement returns the results shown on lines 6 and 7?
- StDf[1:2,-3]
- StDf[1:2,1]
- StDf[1:2,]
- StDf[1,2,]
Answer: The correct answer of the above question is Option B:StDf[1:2,1]