Question
Which R expression selects rows of df where age is greater than 30 using base R?
Select an option. Your answer will be checked instantly.
Correct Answer: B. df[df$age > 30, ]
Explanation:
The logical condition identifies qualifying rows, and the blank column position keeps all columns.
The dollar sign accesses the age variable within df.
Leave a Reply