Chapter 3 of Modeling data with functional programming in R is out

February 8, 2015

(This article was first published on Cartesian Faith » R, and kindly contributed to R-bloggers)

Chapter 3 of my book “Modeling data with functional programming in R” is available for download. This chapter describes map-vectorization and how it’s used in R. I make a distinction between different types of vectorization since f(x) = x^2 + 2*y - 5 is vectorized differently from sum(x). I call the first form map-vectorization, after the higher-order function map. In R, we call this apply, though conceptually they represent the same operation.

This chapter uses the ebola.sitrep package I wrote as the basis for examples. The package downloads and parses PDF situation reports from the Health Ministries of Liberia and Sierra Leone. The parsing process is filled with examples of map operations, and I discuss numerous cases in the chapter. I also delve into some of the properties of map and how these can be used to reason about your code to ultimately implement your ideas succinctly.

Thanks for reading, and all germane comments are welcome.

Modeling data with functional programming – Map vectorization

To leave a comment for the author, please follow the link and comment on their blog: Cartesian Faith » R. 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


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)