Knowledge Quiz: Add-On Packages

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 install the lavaan package from CRAN?

  • Wrong: Installing the development version of lavaan from GitHub
  • Wrong: Accessing the help file for the lavaan() function
  • Correct: Installing from CRAN, but installing into a non-standard library location
  • Wrong: Loading the package, not installing
  • Wrong: Installing dplyr

You run arrange(mtcars, cyl) and R responds with could not find function "arrange". The dplyr package (which provides arrange()) is already installed on your computer. What is the most likely fix?

Since dplyr is already installed, the problem isn’t installation. It’s that the package hasn’t been loaded into the current R session yet. Running library(dplyr) loads the package and makes arrange() available.

Back to top