Skip to content

um-dang/loops-apply-r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()