You could find some notes for code in Rmarkdown. How you use LaTex and code for R: Link
This is the link for the Homework 3, regular expression: Link
This is the link for Homework 4, Atomic Vectors: Link
This is the link for Homework 5, Matrices, lists, and data frames Link
This is the link for Homework 6, Probability Distributions: Link
This is the link for Homework 7, Experimental Designs: Link
This is the link for Homework 8, dlpyr: Link
This is the link for Homework 9, Structure Programming: Link. You could also find the function here
This is the link for Homework 10, For Loops and Randomization : Link. You can find the functions in here
This is the link for Homework 11, Batch Processing: Link.
This is the link for Homework 12, Playing with GGPLOT: Link.