7.5.2.Create R Markdown documents - quanganh2001/Google-Data-Analytics-Professional-Certificate-Coursera GitHub Wiki

Using R Markdown notebooks

With an R Markdown notebook, you can create an interactive R Markdown document that allows users to run your code and explore graphs and charts that visualize that code. Now that you are more familiar with R Markdown, think about how to use it during your own analysis.

What are some of the benefits of using R Markdown notebooks? And are there any projects you have completed that you could have documented using R Markdown notebooks?

Write two paragraphs (150-200 words) discussing the benefits of R Markdown notebooks and how you might use them. Then, visit the discussion forum to read what other learners have written, and engage with two or more posts to share your feedback.

Test your knowledge about creating R Markdown documents

Question 1

What information does a data analyst usually find in the header section of an RMarkdown document? Select all that apply.

  • File type
  • Date
  • Title and author
  • Conclusions

Explain: The header section of an RMarkdown document contains the title, author, date, and file type.

Question 2

While formatting their R Markdown document, a data analyst decides to make one of the headers smaller. What do they type into the document to do this?

A. Backticks

B. Hashtags

C. Parentheses

D. Brackets

The correct answer is B. Hashtags. Explain: Hashtags can be used to make headers smaller. The more hashtags, the smaller the text.

Question 3

To create bullet points in their output document, a data analyst adds _____ to their RMarkdown document.

A. asterisks

B. spaces

C. hashtags

D. brackets

The correct answer is A. asterisks. Explain: To create bullet points in their output document, a data analyst adds asterisks to their RMarkdown document.

Question 4

A data analyst wants to embed a link in their RMarkdown document. They write (click here!)(www.rstudio.com) but it doesn’t work. What should they write instead?

A. "click here!"(www.rstudio.com)

B. click here!(www.rstudio.com)

C. <click here!>(www.rstudio.com)

D. [click here!](www.rstudio.com)

The correct answer is D. [click here!](www.rstudio.com). Explain: The analyst should write [click here!](www.rstudio.com). The text to be linked should be bracketed. The parentheses around the URL itself are correct.