- (4.0)
- | 282 Ratings

Business Analytics with R Interview Questions And Answers 2018. Here Mindmajix sharing a very useful 25 R Business Analytics interview questions. These R interview questions were asked in various interviews by the top MNC companies and prepared by the experts.This list of interview questions on R business analytics will help you to crack your R job interview.

- What is R Programming?
- What are the advantages of using R for business analytics?
- What operating systems can R support?
- Explain the R environment?
- What are vectors in R?
- What are logical vectors in R?
- What are the types of objects in R?
- What are the concatenation functions in R?
- What are Data frames in R?
- What are attach(), search and detach() functions in R?

Are you interested in taking up for Business Analyst With R Certification Training? Enroll for Free Demo on **Business Analyst With R Training!**

**1) What is R Programming?**

A) R is a language and environment for statistical computing and graphics. It is a GNU project which is similar to the S language and environment which was developed at Bell Laboratories.

R can be considered as a different implementation of S. There are some important differences, but much code written for S runs unaltered under R.

**2) What are the advantages of using R for business analytics?**

A) R provides a wide variety of statistical (linear and nonlinear modeling, classical statistical tests, time-series analysis, classification, clustering, …) and graphical techniques, and is highly extensible. The S language is often the vehicle of choice for research in statistical methodology, and R provides an Open Source route to participation in that activity.

One of R’s strengths is the ease with which well-designed publication-quality plots can be produced, including mathematical symbols and formulae where needed. Great care has been taken over the defaults for the minor design choices in graphics, but the user retains full control.

**3) What operating systems can R support?**

A) R is available as Free Software under the terms of the Free Software Foundation’s GNU General Public License in source code form. It compiles and runs on a wide variety of UNIX platforms and similar systems (including FreeBSD and Linux), Windows and MacOS.

**4) Explain the R environment?**

A) R is an integrated suite of software facilities for data manipulation, calculation and graphical display. It includes

- an effective data handling and storage facility,
- a suite of operators for calculations on arrays, in particular matrices,
- a large, coherent, integrated collection of intermediate tools for data analysis,
- graphical facilities for data analysis and display either on-screen or on hardcopy, and
- a well-developed, simple and effective programming language which includes conditionals, loops, user-defined recursive functions and input and output facilities.

**5) What are vectors in R?**

A) R operates on named data structures. The simplest such structure is the numeric vector, which is a single entity consisting of an ordered collection of numbers.

**6) What are logical vectors in R?**

A) As well as numerical vectors, R allows manipulation of logical quantities. The elements of a logical vector can have the values TRUE, FALSE, and NA

**7) What are the types of objects in R?**

A) Vectors are the most important type of object in R, but there are several others which we will meet more formally in later sections.

matrices or more generally arrays are multi-dimensional generalizations of vectors. In fact, they are vectors that can be indexed by two or more indices and will be printed in special ways. See Arrays and matrices.

factors provide compact ways to handle categorical data.

lists are a general form of vector in which the various elements need not be of the same type, and are often themselves vectors or lists. Lists provide a convenient way to return the results of a statistical computation.

data frames are matrix-like structures, in which the columns can be of different types. Think of data frames as ‘data matrices’ with one row per observational unit but with (possibly) both numerical and categorical variables. Many experiments are best described by data frames: the treatments are categorical but the response is numeric.

functions are themselves objects in R which can be stored in the project’s workspace. This provides a simple and convenient way to extend R.

**8) What are the concatenation functions in R?**

A) cbind() and rbind() are concatenation functions in R.

**9) What are Data frames in R?**

A) A data frame is a list with class "data.frame".

**10) What are attach(), search and detach() functions in R?**

A) The attach() function in R can be used to make objects within data frames accessible in R with fewer keystrokes

ds = read.csv("http://www.math.smith.edu/r/data/help.csv")

names(ds)

attach(ds)

mean(cesd)

[1] 32.84768

The search() function can be used to list attached objects and packages. Let's see what is there, then detach() the dataset to clean up after ourselves.

search()

> search()

[1] ".GlobalEnv" "ds" "tools:RGUI" "package:stats"

[5] "package:graphics" "package:grDevices" "package:utils" "package:datasets"

[9] "package:methods" "Autoloads" "package:base"

detach(ds)

**11) What is the read.table() function in R?**

A) To read an entire data frame directly, the external file will normally have a special form.

The first line of the file should have a name for each variable in the data frame.

Each additional line of the file has as its first item a row label and the values for each variable.

**12) What are the generic functions for extracting model information in R?**

A) The value of lm() is a fitted model object; technically a list of results of class "lm". Information about the fitted model can then be displayed, extracted, plotted and so on by using generic functions that orient themselves to objects of class "lm". These include

add1 deviance formula predict step

alias drop1 kappa print summary

anova effects labels proj vcov

coef family plot residuals

**13) What is anova(object_1, object_2)?**

A) anova() function compare a submodel with an outer model and produce an analysis of variance table.

**14) What is ****coef****(object)?**

A) coefficient() function extract the regression coefficient (matrix).

Long form: coefficients(object).

**15) What is deviance(object)?**

A) deviance() function finds residual sum of squares, weighted if appropriate.

**16) What is formula(object)?**

A) formula() function extract the model formula.

**17) What is ****plot****(object)?**

A) Produce four plots, showing residuals, fitted values and some diagnostics.

**18) What is predict(object, newdata=data.frame)?**

A) predict() function - The data frame supplied must have variables specified with the same labels as the original. The value is a vector or matrix of predicted values corresponding to the determining variable values in data.frame.

**19) What is print(object)?**

A) print() function print a concise version of the object. Most often used implicitly.

**20) What ****is**** residuals(object)?**

A) residuals() function extract the (matrix of) residuals, weighted as appropriate.

Short form: resid(object).

**21) What is ****step****(object)?**

A) step() function select a suitable model by adding or dropping terms and preserving hierarchies. The model with the smallest value of AIC (Akaike’s An Information Criterion) discovered in the stepwise search is returned.

**22) What is ****summary****(object)?**

A) summary() function print a comprehensive summary of the results of the regression analysis.

**23) What is ****vcov****(object)?**

A) vcov() returns the variance-covariance matrix of the main parameters of a fitted model object.

**24) What are Families in R?**

A) The class of generalized linear models handled by facilities supplied in R includes gaussian, binomial, poisson, inverse gaussian and gamma response distributions and also quasi-likelihood models where the response distribution is not explicitly specified. In the latter case the variance function must be specified as a function of the mean, but in other cases this function is implied by the response distribution.

**25) What is the ****glm****() function in R?**

A) Since the distribution of the response depends on the stimulus variables through a single linear function only, the same mechanism as was used for linear models can still be used to specify the linear part of a generalized model. The family has to be specified in a different way.

The R function to fit a generalized linear model is glm() which uses the form

> fitted.model <- glm(formula, family=family.generator, data=data.frame)

Explore Business Analytics with R Sample Resumes! Download & Edit, Get Noticed by Top Employers!**Download Now!**

2258 Enrolled

3370 Enrolled

1256 Enrolled

1563 Enrolled

2925 Enrolled

4025 Enrolled

1045 Enrolled

1578 Enrolled

1956 Enrolled

1463 Enrolled

1090 Enrolled

3063 Enrolled

880 Enrolled

1899 Enrolled

3350 Enrolled

3766 Enrolled

1458 Enrolled

3780 Enrolled

1385 Enrolled

75 Enrolled

Get Updates on Tech posts, Interview & Certification questions and training schedules