1. Learn
  2. /
  3. Courses
  4. /
  5. Defensive R Programming

Exercise

Counting Exported Functions

Packages are the engine of R. They contain all the good stuff, in one neatly contained bundle. The public contents of the package are called exports. The getNamespaceExports("pkg_name") function returns a vector of exported functions.

Instructions

100 XP
  • Using the getNamespaceExports() function, how many functions does the ggplot2 package export? Store the result in the variable no_of_functions.