The article discusses the importance of vectorized functions in R, specifically focusing on the apply family of functions designed for data analysis. Using functions like apply(), lapply(), and tapply() enables the computation of summaries such as means and medians efficiently across rows and columns of matrices or data frames. The author mentions the historical context of transitioning from the plyr package to the apply functions and briefly introduces the purrr package for advanced usage. It's suggested that newcomers may find the initial learning curve steep but ultimately rewarding for data manipulation tasks.
If you attempt to use a non-vectorized function on a vector, you'll see an error message such as 'the condition has length > 1 and only the first element will be used'.
There are more than half a dozen functions in the apply family, depending on what type of data object is being acted upon and what sort of data object is returned.
Collection
[
|
...
]