list all functions on CRAN

后端 未结 2 460
星月不相逢
星月不相逢 2020-12-06 18:37

Suppose I\'m trying to run a script of unknown origin, and one of the functions is from a package that is not loaded by the script (an oversight, maybe it was loaded in the

相关标签:
2条回答
  • 2020-12-06 19:35

    You can use the sos package, for example:

    library(sos)
    findFn("adply")
    

    The output is an html including links to online documentation packages.

    0 讨论(0)
  • 2020-12-06 19:40

    collidr package will give you this

    library(collidr)
    collidr::CRAN_packages_and_functions()
    

    It will return a list of packages and their functions from CRAN i.e.

    
    #          package_names                function_names
    # 1                   A3                    A3-package
    # 2                   A3                            a3
    # 3                   A3                       a3.base
    # 4                   A3                a3.gen.default
    # 5                   A3                         a3.lm
    # 6                   A3                         a3.r2
    # 7                   A3                       housing
    # 8                   A3            multifunctionality
    # 9                   A3                       plot.A3
    # 10                  A3               plotPredictions
    #    ...             ...                           ...
    # 294181            ZVCV                          getX
    # 294182            ZVCV              helper_functions
    # 294183            ZVCV                           VDP
    # 294184            ZVCV                          zvcv
    # 294185            ZVCV                  ZVCV_package
    # 294186             zyp                   confint.zyp
    # 294187             zyp                           zyp
    # 294188             zyp                       zyp.sen
    # 294189             zyp                 zyp.trend.csv
    # 294190             zyp              zyp.trend.vector
    
    
    0 讨论(0)
提交回复
热议问题