找出在中引入R a函数的版本

找出在中引入R a函数的版本,r,R,有没有办法找出某些函数是在哪个版本中引入的?例如,regmatches是一个有用的函数,但它是相当新的,我相信它是在2.14中引入的。我怎样才能轻松地找出像regmatches这样的东西是在R2.14中引入的?您可以使用SVN存储库: edd@max:~/svn/r-devel/src/library/base/man$ svn log regmatches.Rd -----------------------------------------------------------------

有没有办法找出某些函数是在哪个版本中引入的?例如,regmatches是一个有用的函数,但它是相当新的,我相信它是在2.14中引入的。我怎样才能轻松地找出像regmatches这样的东西是在R2.14中引入的?

您可以使用SVN存储库:

edd@max:~/svn/r-devel/src/library/base/man$ svn log regmatches.Rd 
------------------------------------------------------------------------
r57006 | hornik | 2011-09-14 14:04:21 -0500 (Wed, 14 Sep 2011) | 1 line

Improve example.
------------------------------------------------------------------------
r56997 | hornik | 2011-09-12 15:16:03 -0500 (Mon, 12 Sep 2011) | 1 line

Document regmatches replacement function.
------------------------------------------------------------------------
r56893 | hornik | 2011-09-02 05:31:01 -0500 (Fri, 02 Sep 2011) | 1 line

Add first version of regmatches replacement function.
------------------------------------------------------------------------
r56818 | hornik | 2011-08-29 02:49:17 -0500 (Mon, 29 Aug 2011) | 1 line

Spelling.
------------------------------------------------------------------------
r56752 | hornik | 2011-08-18 01:40:07 -0500 (Thu, 18 Aug 2011) | 1 line

Add regmatches().
------------------------------------------------------------------------
edd@max:~/svn/r-devel/src/library/base/man$ 

我将
svn log
应用到手册页面,因为我没有立即看到定义函数的R文件;该命令的工作方式与此相同…

比德克的解决方案更简单的是使用R的
新闻
功能:

> newsDB <- news()
> news(grepl("regmatches",Text), db=newsDB)
Changes in version 2.14.0:

NEW FEATURES

    o   New function regmatches() for extracting or replacing matched or
         non-matched substrings from match data obtained by regexpr(),
         gregexpr() and regexec().

更好的方法是使用Julia,而不是Rcpp。是的。@rawr:谢谢你的评论。更新了答案以反映新的“功能”。
> print(news(grepl("news",Text), db=newsDB), doBrowse=FALSE)
Changes in version 3.3.0:

NEW FEATURES

    o   news() now displays R and package news files within the HTML help
         system if it is available.  If no news file is found, a visible
         NULL is returned to the console.