Skip to content

Course Notes

Use this workspace to take notes, store code snippets, or build your own interactive cheatsheet! For courses that use data, the datasets will be available in the datasets folder.

# Import any packages you want to use here

Matrices

  • collection of elements of the SAME DATA TYPE
  • 2D: working w/ only rows and columns
  • constructed using matrix()
  • arguments (the collection you want R to arrange in a matrix, byrow: do you want to have R fill the matrix by rows (T or F), nrow: the amount of rows you want in the matrix)
  • to rename any columns or rows of your matrix; first assign the titles to vectors, then use rownames() or colnames() and assign the vector to it (e.g. colnames(matrix)<- vector)

Add your notes here

# Add your code snippets here