如何在R包中找到所有功能? [英] How to find all functions in an R package?

查看:209
本文介绍了如何在R包中找到所有功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查找包中所有关联功能的最佳方法是什么?我目前正在通过caTools软件包.如果我执行?caTools??caTools,我只是要搜索称为的函数,而不是包中的函数.有没有简单的方法可以访问R gui中的所有功能?有什么好的搜索功能的方法吗?

What is the best way to find all the functions associated in a package?? I am currently going through the caTools package. If I do ?caTools or ??caTools I am simply going to get search for functions called that but not the functions in the package. Is there an easy way to access all the functions in the R gui? Are there any good ways to search for functions?

推荐答案

我猜您只是在寻找help(package = caTools),它将打开浏览器到相关的帮助页面,其中列出了"caTools"中的所有功能包.

I am guessing that you are just looking for help(package = caTools), which will open your browser to the relevant help page that lists all the functions in the "caTools" package.

您也可以尝试:library(help = caTools),但这似乎不能捕获所有内容.关于后一种方法的好处是,您可以捕获输出,以防万一需要在其他地方引用它:

You can also try: library(help = caTools), but that doesn't seem to capture everything. The nice thing about this latter approach is that you can capture the output in case you needed to refer to it somewhere else:

x <- library(help = caTools)
x$info[[2]]
#  [1] "LogitBoost              LogitBoost Classification Algorithm"          
#  [2] "base64encode            Convert R vectors to/from the Base64 format"  
#  [3] "caTools-package         Tools: moving window statistics, GIF, Base64,"
#  [4] "                        ROC AUC, etc."                                
#  [5] "colAUC                  Column-wise Area Under ROC Curve (AUC)"       
#  [6] "combs                   All Combinations of k Elements from Vector v" 
#  [7] "predict.LogitBoost      Prediction Based on LogitBoost Classification"
#  [8] "                        Algorithm"                                    
#  [9] "read.ENVI               Read and Write Binary Data in ENVI Format"    
# [10] "read.gif                Read and Write Images in GIF format"          
# [11] "runmad                  Median Absolute Deviation of Moving Windows"  
# [12] "runmean                 Mean of a Moving Window"                      
# [13] "runmin                  Minimum and Maximum of Moving Windows"        
# [14] "runquantile             Quantile of Moving Window"                    
# [15] "runsd                   Standard Deviation of Moving Windows"         
# [16] "sample.split            Split Data into Test and Train Set"           
# [17] "sumexact                Basic Sum Operations without Round-off Errors"
# [18] "trapz                   Trapezoid Rule Numerical Integration"   

这篇关于如何在R包中找到所有功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆