250+ TOP MCQs on knitr and Answers

Data Science Multiple Choice Questions 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

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

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

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

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

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

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

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

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

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

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

Answer: b
Explanation: knitr produces markdown document.

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

Answer: a
Explanation: Code chunks can have names.

Leave a Reply

Your email address will not be published. Required fields are marked *