searchpath()
R语言中的函数用于列出附加到R搜索路径的包的完整路径。
用法: searchpath()
参数:
这个函数没有参数。
范例1:
# R program to get the full path
# of attached packages in R
# Calling searchpath() function
searchpath()
输出:
[1] ".GlobalEnv" [2] "C:/Program Files/R/R-2.15.2/library/stats" [3] "C:/Program Files/R/R-2.15.2/library/graphics" [4] "C:/Program Files/R/R-2.15.2/library/grDevices" [5] "C:/Program Files/R/R-2.15.2/library/utils" [6] "C:/Program Files/R/R-2.15.2/library/datasets" [7] "C:/Program Files/R/R-2.15.2/library/methods" [8] "Autoloads" [9] "C:/PROGRA~1/R/R-215~1.2/library/base"
范例2:
# R program to get the full path
# of attached packages in R
# Attaching datasets to path
attach(BOD)
attach(airquality)
# Calling searchpath() function
searchpath()
输出:
[1] ".GlobalEnv" [2] "BOD" [3] "airquality" [4] "C:/Program Files/R/R-2.15.2/library/stats" [5] "C:/Program Files/R/R-2.15.2/library/graphics" [6] "C:/Program Files/R/R-2.15.2/library/grDevices" [7] "C:/Program Files/R/R-2.15.2/library/utils" [8] "C:/Program Files/R/R-2.15.2/library/datasets" [9] "C:/Program Files/R/R-2.15.2/library/methods" [10] "Autoloads" [11] "C:/PROGRA~1/R/R-215~1.2/library/base"
相关用法
- R语言 search()用法及代码示例
- R语言 colors()用法及代码示例
- R语言 args()用法及代码示例
- R语言 setdiff()用法及代码示例
- R语言 levels()用法及代码示例
- R语言 dim()用法及代码示例
- R语言 arrayInd()用法及代码示例
- R语言 ncol()用法及代码示例
- R语言 nrow()用法及代码示例
- R语言 max()用法及代码示例
- R语言 min()用法及代码示例
- R语言 sum()用法及代码示例
- R语言 get()用法及代码示例
- R语言 range()用法及代码示例
- R语言 names()用法及代码示例
- R语言 nlevels()用法及代码示例
注:本文由纯净天空筛选整理自nidhi_biet大神的英文原创作品 Get the Full Path of all the Attached Packages in R Programming – searchpath() Function。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。