R Programming MCQ Questions And Answers - Packages
This section focuses on "Packages" in R Programming. These Multiple Choice Questions (MCQ) should be practiced to improve the R Programming skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. Which of the following syntax is used to install forecast package?
Explanation: forecast is used for time series analysis
2. Which splits a data frame and returns a data frame?
Explanation: ddply splits a data frame and returns a data frame.
3. Which of the following is an R package for the exploratory analysis of genetic and genomic data?
Explanation: This package contains Classes and functions for genetic data analysis within the multivariate framework.
4. Which of the following contains functions for processing uniaxial minute-to-minute accelerometer data?
Explanation: This package contains a collection of functions that perform operations on time-series accelerometer data, such as identify non-wear time, flag minutes that are part of an activity about, and find the maximum 10-minute average count value.
5. ______ Uses Grieg-Smith method on 2 dimensional spatial data.
Explanation: The function returns a GriegSmith object which is a matrix with block sizes, sum of squares for each block size as well as mean sums of squares. G1DBN is a package performing Dynamic Bayesian Network Inference.
6. Which of the following package provide namespace management functions not yet present in base R?
Explanation: The package namespace is one of the most confusing parts of building a package. nbpMatching contains functions for non-bipartite optimal matching.
7. What will be the output of the following R code?
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.
8. A bundled package is a package that’s been compressed into a ______ file.
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.
9. .library() is not useful when developing a package since you have to install the package first.
Explanation: library() is not useful when developing a package since you have to install the package first. A library is a simple directory containing installed packages.
10. DESCRIPTION uses a very simple file format called DCF.
Explanation: DESCRIPTION uses a very simple file format called DCF, the Debian control format. When you first start writing packages, you’ll mostly use these metadata to record what packages are needed to run your package.