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。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。