Gives a list of attached packages and R objects
search()
## [1] ".GlobalEnv" "package:stats" "package:graphics"
## [4] "package:grDevices" "package:utils" "package:datasets"
## [7] "package:methods" "Autoloads" "package:base"
Apply the function of “ls”(list) to the corresponding element of the 9 attached packages we searched, and return a list.
lapply(search(), ls)
Give the length of the objects in the 9 attached packaged we searched and return a list.
lapply(lapply(search(), ls), length)
## [[1]]
## [1] 0
##
## [[2]]
## [1] 449
##
## [[3]]
## [1] 87
##
## [[4]]
## [1] 113
##
## [[5]]
## [1] 245
##
## [[6]]
## [1] 104
##
## [[7]]
## [1] 203
##
## [[8]]
## [1] 0
##
## [[9]]
## [1] 1246