A data scientist is given an R data frame, “empdata”, with the columns Age, Salary, Occupation,
Education, and Gender. The data scientist would like to examine only the Salary and Occupation
columns for ages greater than 40. Which command extracts the appropriate rows and columns
from the data frame?

A.
empdata[empdata$Age > 40,c(“Salary”,”Occupation”)]
B.
empdata[c(“Salary”,”Occupation”),empdata$Age > 40]
C.
empdata[Age > 40,(“Salary”,”Occupation”)]
D.
empdata[,c(“Salary”,”Occupation”)]$Age > 40
the first parameter is for row, the second parameter is for column
0
0