InterviewSolution
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.
| 51. |
______is used to view all packages installed.(a) library()(b) search()(c) .libPaths()(d) stringr()I have been asked this question during an interview.This key question is from Packages in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The CORRECT OPTION is (a) library() |
|
| 52. |
Which of the following is uniform distribution?(a) dunif(x, min=0, max=1, log = FALSE)(b) punif(q, min=0, max=1, lower.tail = TRUE, log.p = FALSE)(c) qunif(p, min=0, max=1, lower.tail = TRUE, log.p = FALSE)(d) runif(n, min=0, max=1)This question was posed to me in an interview.My question comes from Commands in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The correct answer is (a) dunif(x, MIN=0, max=1, log = FALSE) |
|
| 53. |
Which of the following sort a dataframe by the order of the elements in B?(a) x[rev(order(x$B)),](b) x[ordersort(x$B),](c) x[order(x$B),](d) x[rev(x$B),]The question was posed to me in a job interview.Question is from Commands topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Correct OPTION is (a) x[rev(order(x$B)),] |
|
| 54. |
_________ involves predicting a response with meaningful magnitude, such as quantity sold, stock price, or return on investment.(a) Regression(b) Summarization(c) Clustering(d) ClassificationThe question was asked during an interview for a job.I need to ask this question from Predictive Analytics in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Right ANSWER is (a) Regression |
|
| 55. |
The purpose of fisher.test() is _______ test for contingency table.(a) Chisq(b) Fisher(c) Prop(d) StemThe question was asked during an online exam.My doubt is from Visualizing Data in division Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» CORRECT answer is (B) Fisher Explanation: prop.test() is used to INFERENCE for 1 proportion using normal approx. |
|
| 56. |
Which of the following syntax is used to install forecast package?(a) install.pack(“forecast”)(b) install.packages(“cast”)(c) install.packages(“forecast”)(d) install.pack(“forecastcast”)The question was posed to me in a national level competition.My question is based upon Packages in division Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Right choice is (c) install.packages(“FORECAST”) |
|
| 57. |
________ provides needed string operators in R.(a) str(b) forecast(c) stringr(d) sqldfI got this question during an online interview.This interesting question is from Packages topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» RIGHT choice is (c) stringr For EXPLANATION: stringr is remarkably EASY to use. |
|
| 58. |
Which of the following function is used for plotting histogram?(a) hist()(b) histog()(c) histg()(d) histo()The question was posed to me in a national level competition.I need to ask this question from Commands in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Correct ANSWER is (a) hist() |
|
| 59. |
Which of the following statement find cases with no missing values?(a) complete |
|
Answer» Right OPTION is (a) complete<-subset(data.df,complete.cases(data.df) |
|
| 60. |
________ is a simple approach to supervised learning. It assumes that the dependence of Y on X1, X2, . . . Xp is linear.(a) Linear regression(b) Logistic regression(c) Gradient Descent(d) Greedy algorithmsI have been asked this question in class test.This key question is from Linear Regression topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» RIGHT option is (a) Linear regression For explanation I would SAY: Linear regression is a simple approach to SUPERVISED learning. It assumes that the dependence of Y on X1, X2, . . . Xp is linear. linear regression is an incredibly POWERFUL tool for ANALYSING data. |
|
| 61. |
Which of the following is called a one-line description of the package?(a) Function(b) Title(c) Interface(d) ClassThis question was posed to me in class test.The question is from Packages topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The correct option is (b) Title |
|
| 62. |
________ contains tools for Approximate Bayesian Computation (ABC).(a) str(b) abc(c) zyz(d) yxqThe question was posed to me in examination.My doubt is from Packages topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Correct answer is (b) ABC |
|
| 63. |
______let’s you perform SQL queries on your R data frames.(a) sqldf(b) plyr(c) forecast(d) daplyI had been asked this question in an online interview.I'd like to ask this question from Packages in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Right choice is (B) plyr |
|
| 64. |
Which of the following is used to plot multiple histograms?(a) multi.plot()(b) multi.hist(c) xyplot.multi()(d) poly()I got this question in an internship interview.The question is from Linear Regression topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The correct option is (B) multi.hist |
|
| 65. |
__________ is proprietary tool for predictive analytics.(a) R(b) SAS(c) SSAS(d) EDRThis question was posed to me during an online exam.Origin of the question is Predictive Analytics topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The correct OPTION is (B) SAS |
|
| 66. |
________ function carries out a chi-square test.(a) chisq.test()(b) t.test()(c) prop.test()(d) fisher.test()The question was posed to me by my school teacher while I was bunking the class.This interesting question is from Visualizing Data topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» RIGHT answer is (a) chisq.test() Easiest explanation: prop.test() is USED to inference for 1 PROPORTION using NORMAL approx. |
|
| 67. |
Which of the following function cross-tabulate tables using formulas?(a) table(b) stem(c) xtabs(d) readI had been asked this question in exam.I need to ask this question from Visualizing Data in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» RIGHT CHOICE is (d) read Explanation: table() list all VALUES of a variable with FREQUENCIES. |
|
| 68. |
_____ package version is the sequence of atleast two integers separated by either. or -.(a) Java(b) C(c) R(d) PythonThis question was posed to me in an online quiz.This question is from Packages in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The correct ANSWER is (C) R |
|
| 69. |
______ is used for Visualisation, verification and calibration of ternary probabilistic forecasts.(a) toss(b) termstrc(c) ternvis(d) satinI got this question by my school teacher while I was bunking the class.My question comes from Packages topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Correct CHOICE is (C) ternvis |
|
| 70. |
__________ is used for the analysis of air pollution data.(a) air(b) openair(c) opena(d) openaraThe question was asked during a job interview.I would like to ask this question from Packages topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Correct CHOICE is (B) openair |
|
| 71. |
________ performs class prediction based on microarray data and clinical parameters(a) M3(b) M2(c) MAclinical(d) M5This question was addressed to me in exam.This key question is from Packages in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» RIGHT OPTION is (b) M2 Explanation: M3 is used for READING M3 files. |
|
| 72. |
______ finds K best paths in a given graph.(a) kBestShortestPaths(b) kcirt(c) ktrees(d) kmapThe question was posed to me in an online interview.Asked question is from Packages topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The correct OPTION is (a) kBestShortestPaths |
|
| 73. |
______ specializes in converting data from wide to long format.(a) gcc(b) reshape(c) reshape2(d) gcc2The question was posed to me by my college professor while I was bunking the class.Asked question is from Packages in division Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The CORRECT CHOICE is (C) RESHAPE2 |
|
| 74. |
Which of the following sets the size of the outer margins for the graph?(a) par(mfrow=c(nrow,mcol))(b) par(ask=TRUE)(c) par(omi=c(0,0,1,0) )(d) par(ask=False)The question was asked in an online interview.The above asked question is from Commands in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Correct choice is (C) par(omi=c(0,0,1,0) ) |
|
| 75. |
Which of the following truncates real x to integers?(a) as.order(x)(b) as.integer(x)(c) as.numeric(x)(d) as.character(x)I have been asked this question in an interview for internship.The origin of the question is Commands topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» CORRECT OPTION is (b) as.INTEGER(x) To elaborate: as.integer for object of class truncates decimal part of image VALUES and then CONVERTS to type integer. |
|
| 76. |
Which of the following statement can read csv files?(a) read.table(filename,header=TRUE,sep=’,’)(b) read.csv(filename,header=TRUE,sep=’,’)(c) read.tab(filename,header=TRUE,sep=’,’)(d) read.tab(filename,header=False,sep=’,’)The question was asked in an interview.The doubt is from Commands in division Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Correct option is (a) read.table(filename,header=TRUE,sep=’,’) |
|
| 77. |
Which of the following convert a matrix of phi coefficients to polychoric correlations?(a) poly()(b) qline()(c) phi2poly(d) multi.plot()This question was addressed to me in final exam.Query is from Linear Regression in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Right answer is (c) phi2poly |
|
| 78. |
___________ are the most commonly documented object.(a) Interface(b) Class(c) Functions(d) LibrariesThis question was addressed to me during an online interview.The question is from Packages in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» CORRECT ANSWER is (c) Functions The explanation is: Function is very most commonly documented object. The introduction block, most functions have three TAGS namely @param, @EXAMPLES and @return. |
|
| 79. |
To release a package to _____ you must pick a standard license.(a) R(b) CRAN(c) CRON(d) StudioI have been asked this question in an interview.Origin of the question is Packages in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The CORRECT answer is (b) CRAN |
|
| 80. |
________ is a package for parsing, applying, and manipulating data cleaning rules(a) edr(b) editrules(c) edrGraphicalTools(d) edrtoolsI got this question in an online interview.I would like to ask this question from Packages topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Right option is (b) editrules |
|
| 81. |
__________ is used for selecting regression transformations.(a) gac()(b) gpl()(c) avas()(d) ggc()I had been asked this question by my school principal while I was bunking the class.This is a very interesting question from Packages topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Correct OPTION is (c) avas() |
|
| 82. |
______ is used to get library location in R.(a) library()(b) search()(c) .libPaths()(d) stringr()The question was posed to me in homework.The origin of the question is Packages in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Right ANSWER is (C) .libPaths() |
|
| 83. |
Which of the following may be used for linear regression?(a) X %*% Y(b) solve(A)(c) solve(A,B)(d) X $*$ YThe question was posed to me by my college professor while I was bunking the class.This is a very interesting question from Commands in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The correct choice is (C) solve(A,B) |
|
| 84. |
Which of the following statement read a tab or space delimited file?(a) read.table(filename,header=TRUE)(b) read.CSV(filename,header=TRUE)(c) read.table(filename,header=FALSE)(d) read.tableall(filename,header=TRUE)This question was posed to me in quiz.This intriguing question originated from Commands topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Right ANSWER is (a) read.table(filename,header=TRUE) |
|
| 85. |
In syntax of linear model lm(formula,data,..), data refers to ______(a) Matrix(b) Vector(c) Array(d) ListThis question was posed to me in an online quiz.My doubt is from Linear Regression topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» CORRECT ANSWER is (b) Vector To explain: Formula is just a symbol to show the RELATIONSHIP and is APPLIED on data which is a vector. In General, data.frame are used for data. |
|
| 86. |
Which of the following builds empirical cumulative distribution function?(a) ecdf()(b) cum(c) cumsum(d) lm()I got this question at a job interview.Query is from Visualizing Data topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The CORRECT choice is (a) ecdf() |
|
| 87. |
Which of the following is used to view dataset in a spreadsheet-type format ?(a) Disp()(b) View()(c) Seq()(d) lm()I got this question in my homework.Question is taken from Visualizing Data in section Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Right ANSWER is (B) View() |
|
| 88. |
Which of the following compute proportions from a contingency table?(a) par()(b) prop.table()(c) anova()(d) mosaicplot()The question was asked in semester exam.My doubt stems from Visualizing Data topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The correct CHOICE is (b) prop.table() |
|
| 89. |
Which of the following is most important when releasing the package?(a) Versioning(b) Developing(c) Redundancy(d) FunctioningThe question was asked in exam.My doubt is from Packages topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Right ANSWER is (a) VERSIONING |
|
| 90. |
To start with the new package in RStudio, double-click the pkgname.Rproj file that _______(a) Delete()(b) Create()(c) Run()(d) Exit()I have been asked this question in an interview for internship.This interesting question is from Packages in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The correct choice is (B) CREATE() |
|
| 91. |
______ splits a data frame and results an array (hence the da). Hopefully you’re getting the idea here.(a) apply(b) daply(c) stats(d) plyrThis question was addressed to me in a national level competition.My query is from Packages topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The correct choice is (B) daply |
|
| 92. |
Which of the following statement finds the maximum for each column?(a) apply(x,2,max)(b) col.max(x)(c) which.min(x)(d) which.max(x)I had been asked this question during an interview for a job.Asked question is from Commands topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The CORRECT answer is (a) apply(x,2,MAX) |
|
| 93. |
Which of the following produces the variance covariance matrix?(a) sd(x, na.rm=TRUE)(b) mad(x, na.rm=TRUE)(c) fivenum(x, na.rm=TRUE)(d) var(x, na.rm=TRUE)The question was asked in my homework.My doubt stems from Commands in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Correct answer is (d) VAR(x, na.rm=TRUE) |
|
| 94. |
_____ list the variables in the workspace.(a) rm(x)(b) rm(list=ls())(c) ls()(d) attach(mat)This question was addressed to me in semester exam.The doubt is from Commands topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Right answer is (c) LS() |
|
| 95. |
Which of the following statement is another way to get a subset?(a) subsetcon(dataset,logical)(b) data.df[data.df=logical](c) sub(dataset,logical)(d) subcon(dataset,logical)The question was posed to me by my college director while I was bunking the class.I want to ask this question from Commands in division Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» CORRECT choice is (B) data.df[data.df=logical] Explanation: SUBSET(data.df,select=variables,logical) get those objects from a data frame that MEET a criterion. |
|
| 96. |
Which of the following code create n samples of size “size” with probability prob from the binomial?(a) z |
|
Answer» The correct option is (b) z <- rbinom(N,size,prob) |
|
| 97. |
When hypothesis tests and confidence limits are to be used, the residuals are assumed to follow the __________distribution.(a) Formal(b) Mutual(c) Normal(d) AbnormalI have been asked this question in a job interview.The origin of the question is Linear Regression in division Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» The correct answer is (C) Normal |
|
| 98. |
What is predicting y for a value of x that is within the interval of points that we saw in the original data called?(a) Regression(b) Extrapolation(c) Intra polation(d) PolationThe question was posed to me at a job interview.I need to ask this question from Linear Regression topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» CORRECT answer is (c) Intra polation For EXPLANATION I would say: Predicting y for a value of x that is within the interval of points that we SAW in the original DATA is called interpolation. Predicting y for a value of x that’s OUTSIDE the range of values we actually saw for x in the original data is called extrapolation. |
|
| 99. |
Which of the following lists names of variables in a data.frame?(a) quantile()(b) names()(c) barchart()(d) par()This question was addressed to me in an interview for job.I need to ask this question from Visualizing Data topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» Right option is (a) QUANTILE() |
|
| 100. |
________ is an incredibly powerful tool for analyzing data.(a) Linear regression(b) Logistic regression(c) Gradient Descent(d) Greedy algorithmsThe question was posed to me in an international level competition.My question is taken from Linear Regression in section Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» CORRECT answer is (a) LINEAR regression Easy explanation: Linear regression is an incredibly powerful tool for ANALYSING data. we’ll focus on FINDING one of the simplest type of RELATIONSHIP: linear. This process is unsurprisingly called linear regression, and it has many applications. |
|