knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
To cite your homework properly, you'll need to do three things.
If you create a UCLA Stats 20 Homework project, and check the Include Bibliography checkbox, one will be created for you, you can also run the command UCLAstats20::make_bib() in the console to generate a default citations.bib file in your working directory.
A citation entry in your .bib file will consist of a type (e.g. @misc), a key (e.g. jake), and several tags specific to that type of reference in a key-value pair format (e.g. title, author, etc.).
@misc{jake,
title = {Conversation},
author = {Jake Elmstedt},
note = {10/08/2020},
year = {2020}
}
Update your YAML header
To have your citations automatically pulled from your bibliography file, you need to put the following in your YAML header
bibliography: <the filename of your bibliography file>bibliography: citations.bibnocite: '@*'Include citations in your document where appropriate.
Each citation you make will have a key associated with it. To include a reference with the key jake, for instance, you would include the text @jake in your .Rmd file at the appropriate place.
For example:
In your .Rmd file you might write something like,
## Question 3 The answer is "blah." I collaborated with @jake on this problem. We discussed ideas about using the `foo()` function to solve this.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.