Knowledge Quiz: Pipes

Note
  • Click the check-mark button to check your answer.
  • Click the question-mark button to see an explanation of the solution.

Which of the following commands will compute the mean of the age variable from the bfi dataset?

  • Incorrect
  • Correct: This command uses the dplyr pipe operator, %>%, to pass bfi$age to the mean() function.
  • Incorrect
  • Incorrect
  • Incorrect

Which of the following pipelines includes a valid use of the placeholder symbol (., or _)?

  • Incorrect: Uses the wrong placeholder symbol
  • Incorrect: Uses the wrong placeholder symbol
  • Correct
  • Incorrect: No placeholder. This code will fail because the dataset is not the first argument in lm().
  • Incorrect: With the Base R pipe, you can only use the placeholder symbol for a named argument.
Back to top