简体   繁体   English

R 工作区中的用户定义函数列表

[英]list of user-defined functions in R workspace

In R there are user-defined functions that are different than those in a library.在 R 中,用户定义的函数与库中的函数不同。

How do I get a list of only those functions?如何获得仅包含这些功能的列表?

I know there is ls() but it gives all objects.我知道有ls()但它提供了所有对象。
I find that class(x) can say "function" if "x" is a function.如果“x”是 function,我发现class(x)可以说“function”。

We may use lsf.str to return the functions created in the global env我们可以使用lsf.str来返回在全局环境中创建的函数

lsf.str()

If we want to just get the names of the functions without the attributes如果我们只想获取没有属性的函数名称

c(lsf.str())

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM