Dason Dason - 1 year ago 71
R Question

Figure out what version of R a function was introduced in

Is there a way to find out what version of R certain functions were introduced in? For example regmatches is a useful function but it is fairly new and I believe it was introduced with 2.14. How could I easily figure out something like regmatches was introduced in R 2.14?

Answer Source

Even easier than Dirk's solution is to use R's news function:

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


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

As of R-3.3.0, news will launch via the HTML help system if it is available. You can suppress it via the print.news_db method:

> print(news(grepl("news",Text), db=newsDB), doBrowse=FALSE)
Changes in version 3.3.0:


    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.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download