MulaiMulai sekarang secara gratis

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.

Latihan ini adalah bagian dari kursus

Defensive R Programming

Lihat Kursus

Petunjuk latihan

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

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Count the number of functions in ggplot2
no_of_functions <- ___
Edit dan Jalankan Kode