跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

统计学 > 计算

arXiv:1701.04781 (stat)
[提交于 2021年1月14日]

标题:checkmate: Fast Argument Checks for Defensive R Programming

作者:Michel Lang
查看论文《checkmate: Fast Argument Checks for Defensive R Programming》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Dynamically typed programming languages like R allow programmers to write generic, flexible and concise code and to interact with the language using an interactive Read-eval-print-loop (REPL). However, this flexibility has its price: As the R interpreter has no information about the expected variable type, many base functions automatically convert the input instead of raising an exception. Unfortunately, this frequently leads to runtime errors deeper down the call stack which obfuscates the original problem and renders debugging challenging. Even worse, unwanted conversions can remain undetected and skew or invalidate the results of a statistical analysis. As a resort, assertions can be employed to detect unexpected input during runtime and to signal understandable and traceable errors. The package "checkmate" provides a plethora of functions to check the type and related properties of the most frequently used R objects and variable types. The package is mostly written in C to avoid any unnecessary performance overhead. Thus, the programmer can conveniently write concise, well-tested assertions which outperforms custom R code for many applications. Furthermore, checkmate simplifies writing unit tests using the framework "testthat" by extending it with plenty of additional expectation functions, and registered C routines are available for package developers to perform assertions on arbitrary SEXPs (internal data structure for R objects implemented as struct in C) in compiled code.
主题: 计算 (stat.CO)
引用方式: arXiv:1701.04781 [stat.CO]
  (或者 arXiv:1701.04781v1 [stat.CO] 对于此版本)
  https://doi.org/10.48550/arXiv.1701.04781
期刊参考: R.Journal 9:1 (2017) 437-445
相关 DOI: https://doi.org/10.32614/RJ-2017-028

提交历史

来自:Michel Lang
[v1] 2021年1月14日 星期四 00:00:00 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

stat.CO
< 上一篇   |   下一篇 >
最新 | 近期 | 2021-01
切换浏览方式为:
stat

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站