R Markdown is a format for writing reproducible, dynamic reports with R. Use it to embed R code and results into slideshows, pdfs, html documents, Word files and more.
For beginners, you are recommended to check the cheatsheet at: https://www.rstudio.com/wp-content/uploads/2015/02/rmarkdown-cheatsheet.pdf
You need to knit your “.rmd” file to an output format. To knit to pdf, you need to install “TinyTex” package by executing the following codes (line by line):
install.packages('tinytex')
tinytex::install_tinytex()
Another way to create a pdf is to knit to html file first, then print to pdf with your browser.
There is another convenient way to share your report with other people. After knitting your report to “html” webpage, click the “publish” button on the top right.
After creating a Rpub account, you can publish your report on the server of Rpub with a permanent link. You can share the link with other people to give them access.
You can submit your homework this way on Canvas in the future (which is recommended).