Skip to content

Instantly share code, notes, and snippets.

@mGalarnyk
Created March 21, 2017 05:06
Show Gist options
  • Save mGalarnyk/48b329c15faad09bd55b62deecac4799 to your computer and use it in GitHub Desktop.
Save mGalarnyk/48b329c15faad09bd55b62deecac4799 to your computer and use it in GitHub Desktop.
Reproducible Research Quiz 2 John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera

Reproducible Research Quiz 2 (JHU) Coursera

Question 1

Who created Markdown?

  • Robert Gentleman

  • Yihui Xie

  • John Gruber

  • Hadley Wickham

Answer Options:
John Gruber

Question 2

When writing a document in R Markdown, how do you denote the beginning of an R code chunk?

  • ```{r}

  • <rcode>

  • ```

  • <code>

Answer Options:
```{r}

Question 3

When using knitr, how do you indicate the height and width of a plot created in a code chunk?

  • Set the 'fig.height' and 'fig.width' options for the code chunk

  • Set the 'height' and 'width' options for the code chunk

  • Set the 'size' and 'scale' options for the code chunk

  • Set the 'dpi' option for the code chunk

Answer Options:
Set the 'fig.height' and 'fig.width' options for the code chunk

Question 4

With some code chunks, we may not want the output generated by the chunk to be rendered into HTML but would prefer to print the output verbatim. How can we specify this preference for a given code chunk?

  • Set the option tidy = FALSE

  • Set the option message = FALSE

  • Set the option results = "asis"

  • Set the option highlight = TRUE

Answer Options:
Set the option results = "asis"

Question 5

When using knitr and R Markdown and producing output in HTML, why should you never edit the resulting HTML file?

  • Every time you knit() the R Markdown file, the HTML file will be overwritten

  • The HTML file is not a text file.

  • Editing the HTML file requires knowledge of a separate markup language.

  • The Markdown file generated by knitr is the appropriate file to edit.

Answer Options:
Every time you knit() the R Markdown file, the HTML file will be overwritten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment