Question 1.

In R, suppose points = data.frame(X=1:4, Y=c(100, 80, 120, 90)). What is the value returned from points[,1]?

Question 2.

In R, suppose data = data.frame(brand=c('A', 'B', 'C', 'D'), sales=c(100, 80, 120, 90)). We like to query the brands whose sales are greater than 90. Which of the following expression returns a list of such brand names?

Those who chose the first answer might have never heard of using logical vector for indesing. They thus picked a seemingly safer answer.

Those who chose the second answer thought indexing starts from 0 like many other programming languages do.

Those who chose the fourth answer thought logical indexing for selecting rows is symmetric with column selection by reversing the posistions.