在Rstudio上导航R代码的高效和递归方式? [英] Efficient and recursive way to navigate through R code on Rstudio?

查看:151
本文介绍了在Rstudio上导航R代码的高效和递归方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用RStudio,因为我发现它是一个很好的IDE。

I am using RStudio because I find that it is a good IDE.

我开始感觉需要通过打包代码来深入理解或破解某些功能。当我尝试使用使用Ctrl +单击鼠标进行导航时对于定义的函数在包中,代码显示在特殊的源查看器中。

I'm starting to feel the need to go through packges code to deeper understanding or hack certains functions. When I try to navigate using Using Ctrl+Click with the mouse For functions defined within packages the code is displayed in a special Source Viewer.

此视图的问题


  1. 这是只读视图(为什么?)。你无法通过调用和定义的函数代码。我知道其他IDE(对于其他语言)我们可以在只读模式下递归遍历代码。

  2. 对于通用函数,我们只有UseMethod行没有代码。

  1. It is read only view(why?). You can't go to through the code of functions called and defined else. I know other IDE (for other languages) where we can go through the code recursively in read only-mode.
  2. For generic function , we have only the UseMethod line without the code.

我的解决方案是加载包(代码源)并使用在文件中查找选项查看代码。

My solution was is to load the package(code source) and to go through the code using the Find in files option.

您是否有更有效的方法分别通过代码?
我愿意接受建议:其他IDE?在Windows / Unix的?网络解决方案:您是否认为可以在云上安装Rstudio服务器版本以通过所有R包而无需加载?

Do you have more efficient method to go respectively through the code? I am open to suggestions: other IDE? Windows/unix? network solution: Do you think it is possible to install Rstudio server version on the cloud to go through all R package without loading?

PS:我的问题主要是关于通过代码没有破解它。

PS : My question is mainly about going through the code not hacking it.

推荐答案

我一般认为github是挖掘包的最佳方式(对于那些发布的那些) 。虽然这远不是​​一个完美的解决方案,但它通常还包括测试和指向您并不总是使用标准?找到的其他文档的链接。如果您需要真正了解一个包,而不是简单地理解一个记录不良的签名,这种方法通常是最有用的。 Hadley Wickham的rubridate是一个方案,这种方法为我付出了代价。另外,我发现通过检查测试和辅助文件,我可以更好地了解代码的质量。

I generally find github to be the best way to dig into packages (for those posted there). While this is far from a perfect solution, it often also includes the tests and links to additional documentation that you don't always find with the standard "?". This approach is generally most useful if you need to truly grok a package, rather than simply understanding a poorly documented signature. Hadley Wickham's lubridate is a package where this approach paid off for me. Additionally, I find I get a better sense of the quality of the code from examining the tests and ancillary files.

这篇关于在Rstudio上导航R代码的高效和递归方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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