Neglected R Super Functions

[This article was first published on R – Win-Vector Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

R has a lot of under-appreciated super powerful functions. I list a few of our favorites below.


6095431665 88664494f0 b

Atlas, carrying the sky. Royal Palace (Paleis op de Dam), Amsterdam.

Photo: Dominik Bartsch, CC some rights reserved.

  • stats::approx(): approximate a curve/function.
  • base::cumsum(): cumulative ordered sum.
  • stats::ecdf(): estimate the cumulative distribution function.
  • base::findInterval(): assign values to bins.
  • base::match(): bulk computation of first match. Can lookup and sort data and even find non-duplicate data.
  • base::Reduce(): nifty functional method to combine multiple function evaluations.
  • base::tapply(): grouped summary function.
  • base::unlist(): build arrays of atomic values from more complicated nested structures.
  • base::Vectorize(): Convert scalar functions into functions ready to operate on arrays.

We would love to hear about some of your favorites.

To leave a comment for the author, please follow the link and comment on their blog: R – Win-Vector Blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)