Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

101.

Which of the following compute analysis of variance table for fitted model?(a) ecdf()(b) cum()(c) anova()(d) bwplot()I had been asked this question in homework.My question comes from Visualizing Data in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct option is (c) anova()

EXPLANATION: ECDF() builds EMPIRICAL cumulative distribution function.

102.

which of the following statement make a mosaic plot?(a) histogram()(b) mosaicplot()(c) bar()(d) which.max(x)This question was addressed to me by my school principal while I was bunking the class.My query is from Visualizing Data in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right choice is (b) mosaicplot()

To EXPLAIN: histogram() is LATTICE command for PRODUCING a histogram.

103.

Which of the following finds the position of a quantile in a dataset?(a) quantile()(b) barplot()(c) barchart()(d) rep()I got this question by my college professor while I was bunking the class.This interesting question is from Visualizing Data topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» RIGHT OPTION is (a) quantile()

Easiest EXPLANATION: BARPLOT() produces a bar graph.
104.

________ is used to view packages currently loaded.(a) library()(b) search()(c) .libPaths()(d) stringr()I have been asked this question in semester exam.Question is taken from Packages topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct CHOICE is (b) search()

The explanation is: This search will allow you to search the contents of the R functions, PACKAGE vignettes, and TASK VIEWS.

105.

Which of the following is used to analyze paleontological time-series?(a) accelerometry(b) parfossil(c) paleoTS(d) nbpMatchingThis question was addressed to me in a job interview.Query is from Packages topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct ANSWER is (C) paleoTS

Best EXPLANATION: This package contains parfossil parallelized functions for palaeoecological and palaeogeographical analysis.

106.

Which of the following statement is normal distribution?(a) dnorm(x, mean=0, sd=1, log = FALSE)(b) pnorm(q, mean=0, sd=1, lower.tail = TRUE, log.p = FALSE)(c) qnorm(p, mean=0, sd=1, lower.tail = TRUE, log.p = FALSE)(d) rnorm(n, mean=0, sd=1)The question was posed to me in unit test.I want to ask this question from Commands in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» RIGHT choice is (a) dnorm(X, mean=0, sd=1, log = FALSE)

The BEST I can explain: d stands for density.
107.

which of the following statement tells the row with the minimum value for every column?(a) which.min(x)(b) which.max(x)(c) z=apply(x,1,which.min)(d) z=apply(1,1,which.max)This question was addressed to me during an internship interview.I'm obligated to ask this question of Commands in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The CORRECT answer is (a) which.min(x)

The best explanation: which() FUNCTION gives the TRUE indices of a LOGICAL OBJECT, allowing for array indices.

108.

The ________ number of your package increases with subsequent releases of a package.(a) Function(b) Studio(c) Version(d) SequenceThe question was posed to me in homework.The doubt is from Packages topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct choice is (C) Version

Explanation: The version number of your package increases with SUBSEQUENT releases of a package, but it’s more than just an INCREMENTING the counter of the way the number CHANGES with each release can convey INFORMATION.

109.

Which of the following is an R package for the exploratory analysis of genetic and genomic data?(a) adeg(b) adegenet(c) anc(d) abcI had been asked this question during a job interview.My question is based upon Packages in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right answer is (b) adegenet

The explanation is: This package CONTAINS Classes and functions for genetic DATA ANALYSIS within the MULTIVARIATE framework.

110.

Which of the following package combine multi-dimensional arrays?(a) stringr(b) comb(c) abind(d) anlyzThe question was asked during an internship interview.This question is from Packages topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right CHOICE is (C) abind

The BEST explanation: This is a generalization of cbind and rbind.

111.

_________ is used to convert wide data to long data.(a) melt(b) dcast(c) cast(d) rcastI have been asked this question in examination.Query is from Packages in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» CORRECT answer is (a) melt

To explain I WOULD say: dcast is used to GO from long to WIDE.
112.

________ makes it incredibly easy to fit time series models like ARIMA, ARMA, AR, Exponential Smoothing, etc.(a) sqldf(b) plyr(c) forecast(d) statsI got this question during an interview.The above asked question is from Packages topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right ANSWER is (C) forecast

Easy EXPLANATION: Most important FEATURE is the resulting forecast PLOT.

113.

Which of the following count the number of good cases when doing pairwise analysis?(a) count.pairwise(b) count() +(c) anova.para()(d) count.poly()I have been asked this question during an interview.My enquiry is from Linear Regression topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right choice is (a) count.pairwise

For explanation I would say: Pairwise COMPARISON generally is any PROCESS of comparing entities in PAIRS to JUDGE which of each ENTITY is preferred.

114.

Which of the following groups find the correlation matrix?(a) factor.model(b) col.max(x)(c) stem(d) which.max(x)The question was posed to me in homework.Query is from Visualizing Data topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» CORRECT CHOICE is (a) FACTOR.model

Easy explanation: factor.congruence is used to find the factor congruence coefficients.
115.

DCF is an abbreviation for__________(a) Debian control function(b) Differentiative common function(c) Debian control format(d) Debian common formatThe question was asked during an online interview.This intriguing question comes from Packages topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right CHOICE is (c) Debian CONTROL format

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.

116.

Which of the following package contains functions for reading and displaying satellite data for oceanographic applications with R?(a) saves(b) satin(c) saws(d) termstrcI got this question at a job interview.Asked question is from Packages topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right option is (b) satin

To ELABORATE: SAVES is USED for FASTER loading of VARIABLES.

117.

The square of the correlation coefficient r 2 will always be positive and is called the ________(a) Regression(b) Coefficient of determination(c) KNN(d) AlgorithmThe question was asked during an internship interview.My question comes from Linear Regression in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct option is (B) Coefficient of DETERMINATION

The explanation is: The square of the correlation coefficient r square will always be positive and is CALLED the coefficient of determination. This also is equal to the proportion of the TOTAL variability that’s explained by a linear model.

118.

______ regression method is also known as the ordinary least squares estimation.(a) Simple(b) Direct(c) Indirect(d) MutualThe question was posed to me in final exam.Origin of the question is Linear Regression topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct answer is (b) Direct

The best explanation: Direct regression method also KNOWN as the ORDINARY least SQUARES estimation. Assuming that a set of n paired observations are available which satisfy the linear regression MODEL.

119.

Which of the following involves predicting a categorical response?(a) Regression(b) Summarization(c) Clustering(d) ClassificationThis question was addressed to me in an online interview.I need to ask this question from Predictive Analytics in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct choice is (d) Classification

To ELABORATE: Classification techniques are WIDELY USED in data mining to classify data.

120.

How many coefficients do you need to estimate in a simple linear regression model (One independent variable)?(a) 1(b) 2(c) 3(d) 4I have been asked this question by my college professor while I was bunking the class.My enquiry is from Linear Regression in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct choice is (B) 2

The EXPLANATION: In SIMPLE linear regression, there is one independent VARIABLE so 2 coefficients (Y=a+bx+error).

121.

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) ClassI got this question during an internship interview.The origin of the question is Packages topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct ANSWER is (a) Path

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.

122.

Which of the following is used to find variance of all values?(a) var()(b) sd()(c) mean()(d) anova()This question was posed to me in my homework.This is a very interesting question from Visualizing Data topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct OPTION is (a) VAR()

For explanation: sd() is used to calculate STANDARD DEVIATION.

123.

Which of the following adds marginal sums to an existing table?(a) par()(b) prop.table()(c) addmargins()(d) quantile()This question was addressed to me in an international level competition.My question is from Visualizing Data in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct OPTION is (B) prop.table()

The EXPLANATION: prop.table() COMPUTES proportions from a CONTINGENCY table.

124.

Which of the following finds the maximum value in the vector x, exclude missing values?(a) rm(x)(b) max(x, na.rm=TRUE)(c) all(x)(d) x%in%yI had been asked this question in an online quiz.My question is taken from Commands topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct choice is (b) max(X, na.rm=TRUE)

The best EXPLANATION: all(x%in%y)RETURNS true if x is a proper subset of y.

125.

________ is rapidly being adopted for computing descriptive and query types of analytics on Big data.(a) EDR(b) Hadoop(c) Azure(d) InfoSightI got this question during an interview.The doubt is from Predictive Analytics in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct option is (b) Hadoop

Easy explanation: However, it has a reputation for not being a suitable environment for high PERFORMANCE complex iterative ALGORITHMS such as logistic regression, generalized LINEAR models, and DECISION trees.

126.

Which of the following groups values of a variable into larger bins?(a) cut(b) col.max(x)(c) stem(d) which.max(x)I got this question by my college director while I was bunking the class.This intriguing question originated from Visualizing Data in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right ANSWER is (a) cut

Easy EXPLANATION: stem() is USED to MAKE a stemplot.

127.

files listed in the Rbuildignore are not included in the ______(a) single(b) source(c) bundle(d) doubleThis question was posed to me by my college director while I was bunking the class.This question is from Packages in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct answer is (c) bundle

Easy 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.

128.

______Uses Grieg-Smith method on 2 dimensional spatial data.(a) G.S.(b) g.data(c) G1DBN(d) G2dbI got this question in an internship interview.This interesting question is from Packages topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right choice is (a) G.S.

Easy 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.

129.

Which of the following finds row sums for each level of a grouping variable?(a) as.numeric(x)(b) rowsum(x, group, reorder = TRUE, …)(c) as.order(x)(d) colSums (x, na.rm = FALSE, dims = 1)The question was posed to me in examination.This is a very interesting question from Commands in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct choice is (b) rowsum(x, group, reorder = TRUE, …)

Explanation: rowsum compute column SUMS across ROWS of a numeric matrix-like object for each LEVEL of a grouping VARIABLE.

130.

Which of the following tests each element of x for membership in y?(a) y%in%x(b) all(x)(c) any(x)(d) x%in%yI had been asked this question in an interview for internship.I need to ask this question from Commands topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right answer is (d) x%in%y

To ELABORATE: y%in%x TESTS each element of y for MEMBERSHIP in x. x%in%y tests each element of x for membership in y.

131.

Which of the following code drop the ith and jth column?(a) new

Answer»

Correct ANSWER is (c) new <- OLD[,-c(i,j)]

The explanation: new <- subset(old,LOGICAL) SELECT those CASES that meet the logical condition.

132.

___________ remove all the variables from the workspace.(a) rm(x)(b) rm(list=ls())(c) ls()(d) attach(mat)I had been asked this question in an internship interview.Query is from Commands in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right choice is (B) RM(list=ls())

To EXPLAIN: attach(mat) make the names of the variables in the matrix or DATA frame available in the WORKSPACE.

133.

Which of the following code will drop the nth column?(a) new

Answer»

The CORRECT answer is (a) new <- OLD[-n,]

Explanation: new <- old[-n,] drops the nth row.

134.

which of the following statement chose those objects meeting a logical criterion?(a) sub(dataset,logical)(b) subset(dataset,logical)(c) subsetcon(dataset,logical)(d) subcon(dataset,logical)This question was addressed to me by my school principal while I was bunking the class.The question is from Commands in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» CORRECT answer is (b) subset(dataset,logical)

To explain I would SAY: R subsetting OPERATORS are powerful and fast.
135.

Which of the following code create a n item vector of random normal deviates?(a) x1

Answer»

The CORRECT option is (C) x1 <- c(rnorm(n))

For explanation I WOULD say: rnorm generates random deviates.