Data Science Questions and Answers – knitr

This set of Data Science Multiple Choice Questions & Answers (MCQs) focuses on “knitr”.

1. Which of the following is suitable for knitr?
a) Reports
b) Data preprocessing documents
c) Technical manuals
d) All of the mentioned
View Answer

Answer: a
Explanation: knitr has short technical documents.

2. Point out the correct combination related to output statements.
a) results: “asis”
b) echo: true
c) echo=false
d) none of the mentioned
View Answer

Answer: a
Explanation: Global option relating to echo have values TRUE and FALSE.

3. Which of the following is required for not echoing the code?
a) echo=TRUE
b) print=TRUE
c) echo=FALSE
d) all of the mentioned
View Answer

Answer: a
Explanation: Code has to be written to set the global options.

4. Which of the following global options are available for figures in knitr?
a) fig.height
b) fig.size
c) fig.breadth
d) all of the mentioned
View Answer

Answer: a
Explanation: fig.height has numeric value.

advertisement
advertisement

5. Which of the following global option has value “hide”?
a) results
b) fig.width
c) echo
d) none of the mentioned
View Answer

Answer: a
Explanation: Workflow R Markdown is a format for writing reproducible, dynamic reports with R.

6. Which of the following is the correct order of conversion?
a) .md->.Rmd->.html
b) .Rmd->.md->.html
c) .Rmd->.md->.xml
d) all of the mentioned
View Answer

Answer: a
Explanation: knitr converts markdown document in to html by default.

7. knitr is good for complex time-consuming computations.
a) True
b) False
View Answer

Answer: b
Explanation: knitr is poor for complex time-consuming computations.

8. Which of the following statement is used for importing knitr library?
a) library(knitr)
b) import knitr
c) lib(knitr)
d) none of the mentioned
View Answer

Answer: a
Explanation: knitr is not good for documents that require precise formatting.

advertisement

9. The document produced by knitr document has which of the following extension?
a) .md
b) .rmd
c) .html
d) none of the mentioned
View Answer

Answer: b
Explanation: knitr produces markdown document.

10. Code chunks begin with “`{r} and end with “`.
a) True
b) False
View Answer

Answer: a
Explanation: Code chunks can have names.

advertisement

Sanfoundry Global Education & Learning Series – Data Science.

Here’s the list of Best Books in Data Science.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.