且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在R包中找到所有功能?

更新时间:2023-02-18 12:29:50

我猜您只是在寻找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"