0
0
R Programmingprogramming~10 mins

Output formats (HTML, PDF, Word) in R Programming - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create an HTML report using R Markdown.

R Programming
rmarkdown::render(input = "report.Rmd", output_format = [1])
Drag options to blanks, or click blank then click option'
A"html_document"
B"pdf_document"
C"word_document"
D"md_document"
Attempts:
3 left
💡 Hint
Common Mistakes
Using "pdf_document" or "word_document" instead of "html_document".
2fill in blank
medium

Complete the code to generate a PDF report from an R Markdown file.

R Programming
rmarkdown::render(input = "summary.Rmd", output_format = [1])
Drag options to blanks, or click blank then click option'
A"word_document"
B"pdf_document"
C"html_document"
D"github_document"
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing formats that produce HTML or Word instead of PDF.
3fill in blank
hard

Fix the error in the code to produce a Word document from R Markdown.

R Programming
rmarkdown::render(input = "doc.Rmd", output_format = [1])
Drag options to blanks, or click blank then click option'
A"word_document"
B"pdf_document"
C"beamer_presentation"
D"html_document"
Attempts:
3 left
💡 Hint
Common Mistakes
Using PDF or HTML formats when Word output is needed.
4fill in blank
hard

Fill both blanks to create an HTML report with a custom output file name.

R Programming
rmarkdown::render(input = [1], output_file = [2], output_format = "html_document")
Drag options to blanks, or click blank then click option'
A"my_report.Rmd"
B"custom_report.html"
C"report.Rmd"
D"output.html"
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping input and output file names.
Using file names with wrong extensions.
5fill in blank
hard

Fill all three blanks to generate a PDF report with a custom output file and quiet mode enabled.

R Programming
rmarkdown::render(input = [1], output_file = [2], output_format = [3], quiet = TRUE)
Drag options to blanks, or click blank then click option'
A"analysis.Rmd"
B"final_report.pdf"
C"pdf_document"
D"html_document"
Attempts:
3 left
💡 Hint
Common Mistakes
Using HTML format or wrong file extensions for PDF output.