#search() 查詢目前所有被載入的套件列表
search()
## [1] ".GlobalEnv"        "package:stats"     "package:graphics" 
## [4] "package:grDevices" "package:utils"     "package:datasets" 
## [7] "package:methods"   "Autoloads"         "package:base"
#lapply(search(), ls) 列出各套件裡的所有項目的名子
str(lapply(search(), ls))
## List of 9
##  $ : chr(0) 
##  $ : chr [1:448] "acf" "acf2AR" "add.scope" "add1" ...
##  $ : chr [1:87] "abline" "arrows" "assocplot" "axis" ...
##  $ : chr [1:110] "adjustcolor" "as.graphicsAnnot" "as.raster" "axisTicks" ...
##  $ : chr [1:245] "?" "adist" "alarm" "apropos" ...
##  $ : chr [1:104] "ability.cov" "airmiles" "AirPassengers" "airquality" ...
##  $ : chr [1:218] "addNextMethod" "allGenerics" "allNames" "Arith" ...
##  $ : chr(0) 
##  $ : chr [1:1232] "-" "-.Date" "-.POSIXt" "!" ...
#lapply(lapply(search(), ls), length)  #以數目表示
lapply(lapply(search(), ls), length)
## [[1]]
## [1] 0
## 
## [[2]]
## [1] 448
## 
## [[3]]
## [1] 87
## 
## [[4]]
## [1] 110
## 
## [[5]]
## [1] 245
## 
## [[6]]
## [1] 104
## 
## [[7]]
## [1] 218
## 
## [[8]]
## [1] 0
## 
## [[9]]
## [1] 1232
#data resource
?ls
## starting httpd help server ... done
?search
?lapply