Complete the code to select rows where the column 'age' is greater than 30.
filtered_data <- filter(data, age [1] 30)
The filter() function selects rows where the condition is TRUE. To select rows with age greater than 30, use the '>' operator.
Complete the code to select rows where the column 'score' is equal to 100.
perfect_scores <- filter(data, score [1] 100)
To select rows where 'score' is exactly 100, use the equality operator '=='.
Fix the error in the code to select rows where 'height' is less than or equal to 170.
short_people <- filter(data, height [1] 170)
The correct operator for 'less than or equal to' is '<='. The operator '=>' is invalid in R.
Fill both blanks to select rows where 'weight' is greater than 60 and 'age' is less than 50.
selected <- filter(data, weight [1] 60, age [2] 50)
To select rows where weight is greater than 60, use '>'. To select rows where age is less than 50, use '<'.
Fill all three blanks to select rows where 'score' is greater than 80, 'age' is less than 30, and 'height' equals 175.
filtered <- filter(data, score [1] 80, age [2] 30, height [3] 175)
Use '>' for score greater than 80, '<' for age less than 30, and '==' for height equal to 175.