Skip to content

Latest commit

 

History

History
22 lines (12 loc) · 957 Bytes

README.md

File metadata and controls

22 lines (12 loc) · 957 Bytes

loops-apply-r

IMDb_Economist_tv_ratings.csv courtesy of tidytuesday

View the rendered RMarkdown as HTML here.

Overview of lesson

1. R basics - vectors, matrices, lists, logicals

2. Iterating through vectors and matrices with for loops

3. Vectorized vs. sapply vs. for loop

Inspired by this post

4. Looping over a vector or list: sapply() or lapply()

5. Looping over a matrix/data.frame: apply()

6. Faster looping with future.apply

Here's a Data Camp tutorial to learn more about paralell programming in R -- specifically future and future.apply()