search()
R語言中的函數用於獲取R搜索路徑中所有附加包的列表。
用法: search()
參數:
這個函數沒有參數。
範例1:
# R program to list the packages
# attached to R search path
# Calling search() function
search()
輸出:
[1] ".GlobalEnv" "package:stats" "package:graphics" [4] "package:grDevices" "package:utils" "package:datasets" [7] "package:methods" "Autoloads" "package:base"
範例2:
# R program to list the packages
# attached to R search path
# Attaching datasets to path
attach(airquality)
attach(BOD)
# Calling search() function
search()
輸出:
[1] ".GlobalEnv" "BOD" "airquality" [4] "package:stats" "package:graphics" "package:grDevices" [7] "package:utils" "package:datasets" "package:methods" [10] "Autoloads" "package:base"
相關用法
- R語言 searchpath()用法及代碼示例
- R語言 get()用法及代碼示例
- R語言 colors()用法及代碼示例
- R語言 args()用法及代碼示例
- R語言 seq.int()用法及代碼示例
- R語言 optimize()用法及代碼示例
- R語言 as.list()用法及代碼示例
- R語言 is.list()用法及代碼示例
- R語言 ls()用法及代碼示例
- R語言 setdiff()用法及代碼示例
- R語言 levels()用法及代碼示例
- R語言 dim()用法及代碼示例
- R語言 arrayInd()用法及代碼示例
- R語言 ncol()用法及代碼示例
- R語言 nrow()用法及代碼示例
- R語言 max()用法及代碼示例
注:本文由純淨天空篩選整理自nidhi_biet大神的英文原創作品 Get a List of all the Attached Packages in R Programming – search() Function。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。