Add citations

1.1 Explore the visual editor

Open your R Markdown document from the last task.

Switch to the visual editor by clicking on the button on the top left.

First, scroll through your document and see how it looks different from the source document view.

Take some minutes and explore the visual editor. If you want, you can try to e.g.,

After you inserted an element, switch back to the normal R Studio editor view (click on the compass button again) and see how your original document changed.

1.2. Add Citation

Add citation of Gorman et al. (2014) via visual editor

First, cite the original paper that published and analysed the penguin data set. The paper is by Gorman et al. (2014).

In the visual editor and

Before inserting the citation, have a look at the options that the Insert Citation window offers. On the bottom, There is a check box to chose between in-text (without brackets) or normal (in brackets) citation. You can leave the rest at the default settings.

Now hit Insert and see what changed in the document:

Now try adding the same citation to a different location in your document. Just start typing @ and then the first letters of the citation. RStudio should suggest you citations to chose from.

Extra

Add a second citation for the palmerpenguins package.

Open the references.bib file in RStudio (or any other text editor) and add the following BibTeX entry in a new line:

@Manual{horst2020,
    title = {palmerpenguins: Palmer Archipelago (Antarctica) penguin data},
    author = {Allison Marie Horst and Alison Presmanes Hill and Kristen B Gorman},
    year = {2020},
    note = {R package version 0.1.0},
    doi = {10.5281/zenodo.3960218},
    url = {https://allisonhorst.github.io/palmerpenguins/},
  }

Save the file and close it.

Now go to you R Markdown document, switch to the visual editor and select a location where you want to add the new citation.

Knit the document.

Were citation and reference added correctly to the text?