R and RStudio: difficulty 3

scores is a data frame with 40 rows and 3 columns named student, section and total, where total is numeric and contains no missing values. A student writes two lines intending to keep only the rows where total exceeds 70. At least one of the rows numbered 4 through 40 has a total greater than 70.

a <- scores[scores$total > 70, ]
b <- scores[scores$total > 70]

What is the difference between them?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More R and RStudio Questions: