首页    期刊浏览 2024年12月02日 星期一
登录注册

文章基本信息

  • 标题:In Search of C/C++ & FORTRAN Routines
  • 本地全文:下载
  • 作者:Duncan Temple Lang
  • 期刊名称:R News
  • 印刷版ISSN:1609-3631
  • 出版年度:2001
  • 卷号:1
  • 期号:3
  • 页码:20
  • 出版社:The R Foundation for Statistical Computing
  • 摘要:One of the powerful features of the S language (i.e., R and S-Plus) is that it allows users to dynamically (i.e., in the middle of a session) load and call arbitrary C/C++ and FORTRAN routines. The .C(), .Call()1, .Fortran() and .External() functions allow us to call routines in third-party libraries such as NAG, Atlas, Gtk, while the data is created and managed in S. Importantly, it also allows us to develop algorithms entirely in S and then, if needed, gradually move the computationally intensive parts to more efficient C code. More recently, we have generalized these interfaces to “foreign” languages to provide access to, for example, Java, Python, Perl and JavaScript. In this article we discuss some of the pitfalls of the current mechanism that R uses to locate these native routines. Then we present a new mechanism which is more portable, and offers several beneficial side effects which can make using native routines more robust and less error-prone.
国家哲学社会科学文献中心版权所有