March 2016
Beginner to intermediate
340 pages
7h 20m
English
We heard the term vectorized earlier when we talked about operating on vectors without using loops. While looping is a great way to iterate through vectors and perform computations, it is not very efficient when we deal with what is known as Big Data. In this case, R provides some advanced constructs which we will be looking at in this section. We will be covering the following functions:
lapply: Loops over a list and evaluates a function on each elementsapply: A simplified version of lapplyapply: Evaluates a function on the boundaries or margins of an arraytapply: Evaluates a function over subsets of a vectormapply: A multivariate version of lapplyLike we mentioned earlier, lapply takes a list and a function ...
Read now
Unlock full access