Course Notes
Use this workspace to take notes, store code snippets, or build your own interactive cheatsheet! The datasets used in this course are available in the datasets folder.
# Import any packages you want to use here
Take Notes
Add notes here about the concepts you've learned and code cells with code you want to keep.
Add your notes here
When comparing if a statement is true, simply write the logic. No if/then necessary.
example # Check if you realized higher total gains in poker than in roulette
result is a boolean (TRUE, FALSE)
total_poker > total_roulette
You can select the desired elements, by putting selection_vector between the square brackets that follow poker_vector:
poker_vector[selection_vector] (Invalid URL)
newvector <- rowsums(matrix name)... this sums each row of a matrix cbind(vector1, vector2,...) - combines columns
rbind(matrix 1, matrix2...) - combines matrices colsums(matrix)-- sums all column