This set of R Programming Language Multiple Choice Questions & Answers (MCQs) focuses on “Packages – 4”.
1. What will be the output of the following R code?
install.packages(c("devtools", "roxygen2"))
a) Develops the tools
b) Exits R studio
c) Installs the given packages
d) Nothing happens
View Answer
Explanation: Make sure you have the latest version of R and then run the above code to get the packages you’ll need. It installs the given packages. Confirm that you have a recent version of RStudio.
2. Which of the following is the formal requirement?
a) Package
b) Function
c) Letters
d) Interfaces
View Answer
Explanation: There are three formal requirements: the name can only consist of letters, numbers and periods, i.e., it must start with the letter and it should not end with a period.
3. To start with the new package in RStudio, double-click the pkgname.Rproj file that _______
a) Delete()
b) Create()
c) Run()
d) Exit()
View Answer
Explanation: To get started with your new package in RStudio, double-click the pkgname.Rproj file that create() just made. This will open a new RStudio project for your package. Projects are the way to develop packages.
4. If you have an existing package that doesn’t have an .Rproj file, you can use devtools for the use_rstudio(“_____/to/package”) to add it.
a) Path
b) Package
c) Function
d) Class
View Answer
Explanation: If you have an existing package that doesn’t have an .Rproj file, you can use devtools for the use_rstudio(“path/to/package”) to add it.
5. An .Rproj file is a ____ file.
a) Pdf
b) Jpeg
c) Text
d) Png
View Answer
Explanation: An .Rproj file is a text file. If you don’t use RStudio, you can get many of the benefits by starting a new R session and ensuring that the directory is set to the package directory.
6. A bundled package is a package that’s been compressed into a ______ file.
a) Double
b) Triple
c) Single
d) No file
View Answer
Explanation: A bundled package is a package that’s been compressed into a single file. A source package is just a directory with components like R/, DESCRIPTION, and so on.
7. ________ are built in R so that you get HTML.
a) Vignettes
b) Vighnaants
c) Bignats
d) Viddnets
View Answer
Explanation: Vignettes are built for getting the HTML and PDF output instead of Markdown or LaTeX input. A bundled package is a package that’s been compressed into a single file.
8. Which of the following package has temporary files?
a) Single
b) Source
c) Bundle
d) Double
View Answer
Explanation: Source package might contain temporary files used to save time during development and the compilation artifacts in a source. These will be never found in a bundle.
9. files listed in the Rbuildignore are not included in the ______
a) single
b) source
c) bundle
d) double
View Answer
Explanation: Files listed in the Rbuildignore were not included in the bundle. .Rbuildignore prevents files from the src package and appearing in the bundled package. It allows you to have some extra directories in your source package that will not be included in the package bundle.
10. .Rbuildignore prevents files in the ___________ package from appearing in the bundled package.
a) single
b) source
c) bundle
d) double
View Answer
Explanation: .Rbuildignore prevents files from the source package and appearing in the bundled package. It allows to have some extra directories in your source package that will not be included in the package bundle.
Sanfoundry Global Education & Learning Series – R Programming Language.
Here’s the list of Best Books in R Programming Language .
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Check Information Technology Books
- Check R Programming Books
- Apply for Programming Internship
- Practice Programming MCQs