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.
Este exercício faz parte do curso
Defensive R Programming
Instruções do exercício
- Using the
getNamespaceExports()
function, how many functions does the ggplot2 package export? Store the result in the variableno_of_functions
.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Count the number of functions in ggplot2
no_of_functions <- ___