Neglected R Super Functions

April 11, 2018
By

(This article was first published on R – Win-Vector Blog, and kindly contributed to R-bloggers)

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 on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

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)