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.

1.

________ function is usually used inside another function and throws a warning whenever a particular package is not found.(a) Dplyr(b) Require(c) Coin(d) SampleI had been asked this question in an internship interview.Question is from Functions topic in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct option is (b) Require

Easiest explanation: Require () function is USUALLY used inside the other function and GIVES a warning WHENEVER a particular PACKAGE is not found. Library () function will give an ERROR message if the desired package is not loaded.

2.

Point out the correct statement?(a) Vectorizing the function can be accomplished easily with the Vectorize() function(b) There are different levels of indication that can be used, ranging from mere notification to fatal error(c) Vectorizing the function can be accomplished easily with the vector() function(d) Warnings are generated by the run() functionThis question was addressed to me in class test.My question is from Debugging in division Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The CORRECT answer is (a) Vectorizing the function can be accomplished easily with the Vectorize() function

The EXPLANATION: Vectorize() function does not preserve the INVISIBILITY of the RETURN VALUE.

3.

Which function is used to select variables and observations from a given dataset?(a) Subset()(b) Sample()(c) While()(d) Signal()This question was posed to me during an online exam.My doubt is from Functions in division Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct choice is (a) Subset()

Explanation: Subset () function is used to select variables and observations from a given dataset. R has a large NUMBER of in-built functions and also the USER can CREATE their own functions.

4.

The ________ for R are the main feature that make it different from the original S language.(a) scoping rules(b) closure rules(c) environment rules(d) closure & environment rulesI got this question by my college director while I was bunking the class.Query is from Scoping Rules topic in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The correct answer is (a) scoping rules

For explanation I would SAY: This function never actually uses the argument b, so CALLING f(2) will not PRODUCE an ERROR because the 2 gets positionally MATCHED to a.

5.

How do you create log linear models in R language?(a) loglm()(b) logmn()(c) logfn()(d) loghy()The question was posed to me during a job interview.This interesting question is from Functions topic in division Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The correct option is (a) loglm()

Explanation: loglm is fit log-linear models by iterative PROPORTIONAL scaling. This function PROVIDES a front-end of the STANDARD function, loglin, to allow log-linear models to be SPECIFIED and fitted in a MANNER similar to that of other fitting functions.

6.

How many types of data structures does R language have?(a) 2(b) 3(c) 5(d) 8I have been asked this question in an online interview.Asked question is from Functions in chapter Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The correct choice is (a) 2

The best I can explain: R language consists of Homogeneous and HETEROGENEOUS data STRUCTURES. Homogeneous data structures have the same type of OBJECTS – Vector, Matrix and Array. Heterogeneous data structures have a different type of objects – Data FRAMES and lists.

7.

How missing values and impossible values are represented in R language?(a) NA(b) NAN(c) NA & NAN(d) Not ExistThis question was posed to me in an online quiz.This interesting question is from Functions topic in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The correct option is (c) NA & NAN

For explanation I would say: NaN (Not a NUMBER) is used to represent impossible VALUES whereas NA (Not Available) is referred to represent missing values. It is good to FIND the missing values and then TAKE the necessary STEPS to handle them.

8.

Which of the following is primary tool for debugging?(a) debug()(b) trace()(c) browser()(d) traceback()I have been asked this question in homework.This intriguing question comes from Debugging Tools topic in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer» RIGHT option is (a) DEBUG()

Easiest explanation: Primary tools are mainly USED for DEBUGGING R code.
9.

__________ prints out the function call stack after an error occurs.(a) trace()(b) traceback()(c) back()(d) traback()The question was posed to me in an interview.The question is from Debugging Tools topic in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right choice is (B) traceback()

The best explanation: traceback() does nothing if there’s no ERROR. trace() INTERACTIVE tracing and debugging of calls to a FUNCTION or method.

10.

__________ function is used for reading the .csv file in R language.(a) Write.csv()(b) Read.csv ()(c) Let.csv()(d) Table.csv()This question was addressed to me in semester exam.I'm obligated to ask this question of Functions in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct option is (B) Read.csv ()

The best EXPLANATION: read.csv () function is used for reading the .csv file in R language. We will use the built in the read.csv() function call, which reads the DATA as the data frame, and assign the data frame to a variable.

11.

MapReduce jobs submitted from either Oozie, Pig or Hive can be used to encode, improve and sample the data sets from _________ into R.(a) HDLS(b) HDFS(c) HDLSV(d) HSSLVThis question was addressed to me in homework.Origin of the question is Functions in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct choice is (b) HDFS

The explanation is: MAPREDUCE JOBS submitted from either OOZIE, Pig or Hive can be used for encode, improve and SAMPLE the data sets from HDFS into R. This helps to leverage complex analysis tasks with the subset of data prepared in R.

12.

R code can be tested using _________________ package.(a) Dplyr(b) Hadley’s testthat(c) SKLearn(d) KNNI got this question in unit test.Question is taken from Functions in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer» RIGHT option is (b) Hadley’s testthat

Easiest explanation: R code can be TESTED using Hadley’s testthat package. Testthat draws inspiration from the xUnit family of TESTING packages, as well as from many of the innovative ruby testing libraries.
13.

__________ package is used to speed up data frame management code.(a) Data.table(b) Dplyr(c) Table(d) Data.dplyrI had been asked this question by my school teacher while I was bunking the class.I'd like to ask this question from Functions in chapter Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right answer is (b) Dplyr

To explain: dplyr is a powerful R-package to transform and SUMMARIZE tabular data with rows and columns. dplyr package is used to speed up data FRAME management code. dplyr is a package for data MANIPULATION, written and MAINTAINED REGULARLY by Hadley Wickham.

14.

Which function in R language is used to find out whether the means of 2 groups are equal to each other or not?(a) f.tests ()(b) l.tests ()(c) t.tests ()(d) not existI have been asked this question in final exam.This interesting question is from Functions topic in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The correct CHOICE is (c) t.tests ()

To explain I WOULD say: t.tests () function in R language is used to find out whether the means of 2 groups are equal to each other. It is not used most COMMONLY in R. It is used in some specific conditions.

15.

Two vectors M and N are defined as M

Answer»

The CORRECT OPTION is (d) Z <- (3, 4, 4)

For explanation: In R language when the vectors have different lengths, the multiplication begins with the smaller vector and continues till all the elements in the LARGER vector have been MULTIPLIED.

16.

What will be the value of following R expression?(a) Warning in log(c(-1, 2)): NaNs produced(b) Error in log(c(-1, 2)): NaNs produced(c) Message(d) All of the mentionedThis question was addressed to me in my homework.Question is taken from Debugging in division Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right answer is (B) Error in log(c(-1, 2)): NaNs produced

To EXPLAIN I would say: Warning is produced due to negative VALUES.

17.

Point out the wrong statement?(a) Dynamic scoping turns out to be particularly useful for simplifying statistical computations(b) Lexical scoping turns out to be particularly useful for simplifying statistical computations(c) The scoping rules of a language determine how values are assigned to free variables(d) An environment is a collection of (symbol, value) pairs, i.e. x is a symbol and 3.14 might be its valueI got this question in a job interview.My question is taken from Scoping Rules topic in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct OPTION is (a) Dynamic scoping turns out to be particularly USEFUL for simplifying STATISTICAL computations

The explanation is: FREE variables are not formal arguments and are not local variables (ASSIGNED inside the function body).

18.

How will you check if an element is present in a vector?(a) Match()(b) Dismatch()(c) Mismatch()(d) Search()The question was asked in an interview for internship.I need to ask this question from Functions topic in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct choice is (a) MATCH()

The explanation: It can be done using the match () function- match () function returns the first APPEARANCE of a particular element. The other way is to use %in% which returns a BOOLEAN VALUE either true or FALSE.

19.

Write a function to extract the first name in the string “Mrs. Jake Luther”?(a) Substring(b) Substr(c) Substi(d) ReturnI got this question in an online interview.I want to ask this question from Functions topic in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The CORRECT answer is (b) Substr

The best I can EXPLAIN: The substr() function gives a part of a string. The substr() METHOD will give parts of a string, beginning at the character of the specified position, and returns the specified number of characters.

20.

What will be the class of the vector if you concatenate a number and NA?(a) Number(b) Character(c) Integer(d) No classThis question was posed to me in quiz.Asked question is from Functions in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The CORRECT choice is (a) Number

Best explanation: The CLASS of the resulting vector if you concatenate a number and NA is a Number. Decimal values are ALSO CALLED NUMERIC in R. It is the default computational data type in R language.

21.

__________ can contain heterogeneous inputs.(a) Matrix(b) Data Frames(c) Matrix and Data Frames(d) Does not existsI got this question in quiz.This intriguing question comes from Functions in division Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer» CORRECT choice is (b) Data Frames

To explain: Data frame can contain HETEROGENEOUS inputs while a matrix cannot. In the matrix, only similar data types can be stored WHEREAS in a data frame there can be DIFFERENT data types like CHARACTERS, integers or other data frames.
22.

What are the different types of sorting algorithms available in R language?(a) Bubble(b) Selection(c) Merge(d) All sortsI have been asked this question in an internship interview.This interesting question is from Functions topic in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right option is (d) All SORTS

Explanation: BUCKET Sort, Selection Sort, QUICK Sort, Bubble Sort, Merge Sort is the different sorts available in R LANGUAGE. Each and Every sorting algorithm is available in R.

23.

The recover() function will first print out the function call stack when an _______ occurs.(a) Error(b) Warning(c) Messages(d) deleteThis question was posed to me in unit test.Question is taken from Debugging in division Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer» RIGHT choice is (a) Error

Explanation: When you CHOOSE a frame NUMBER, you will be PUT in the browse and will have the ability to POKE around.
24.

The only environment without a parent is the ________ environment.(a) full(b) half(c) null(d) emptyThe question was asked in a national level competition.Question is from Scoping Rules topic in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The CORRECT choice is (d) empty

The best explanation: Every environment has a parent environment and it is possible for an environment to have MULTIPLECHILDREN”.

25.

__________ function takes various parameters like formula, data, subset, labels, etc.(a) Pears(b) Pairs(c) Tears(d) CarsThis question was posed to me by my school principal while I was bunking the class.This intriguing question originated from Functions topic in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right option is (B) Pairs

For explanation I WOULD say: Pairs FUNCTION takes various parameters LIKE FORMULA, data, subset, labels, etc. A matrix of scatterplots can be produced using pairs.

26.

Point out the correct statement?(a) POSIX represents a portable operating system interface, primarily for UNIX systems(b) There are different levels of indication that can be used, ranging from mere notification to fatal error(c) The default input format for POSIX dates consists of the month, followed by the year and day, separated by slashes or dashes(d) R don’t have any way to indicate to you that something’s not rightThis question was addressed to me in a national level competition.I need to ask this question from Dates and Times topic in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct answer is (a) POSIX represents a portable OPERATING system interface, primarily for UNIX systems

To explain I would say: Dates stored in the POSIX format are date/TIME values (LIKE dates with the chron library), but also allow modification of time zones.

27.

_____________ will produce a sequential vector c( (1,2,3,4,5,6,7,8,9)).(a) Seq(9)(b) Seq(10)(c) Seq(15)(d) Seq(12)I have been asked this question at a job interview.My query is from Functions in division Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right choice is (a) Seq(9)

To explain: Seq generates a sequence of a PRIORI known pattern. Seq_along(6) will produce a vector with length 6 whereas seq(6) will produce a sequential vector from 1 to 6 C((1,2,3,4,5,6)).

28.

What is the memory limit in R for 32 bit system?(a) 8 TB(b) 9TB(c) 10TB(d) 3GBThe question was asked in final exam.I need to ask this question from Functions in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right option is (d) 3GB

To explain I would SAY: 8TB is the memory limit for 64-bit system memory and 3GB is the limit for 32-bit system memory. A solid UNDERSTANDING of R’s memory management will help you predict how much memory you’ll need for a given TASK.

29.

If the function in a console is.matrix(X) returns true then X can be considered as a _______(a) Matrix object(b) Matrix data object(c) Matrix vector(d) VectorThis question was addressed to me by my school teacher while I was bunking the class.This intriguing question comes from Functions topic in division Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct option is (B) Matrix DATA object

The EXPLANATION is: The function call is.matrix(X) returns TRUE then X can be termed as a matrix data object. R has a large NUMBER of in-built functions and also the user can create their own functions.

30.

If the programmers want the output to be a data frame or a vector, then________ function is used.(a) Lapply(b) Sapply(c) Vapply(d) ZapplyI have been asked this question in my homework.My doubt is from Functions topic in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer» CORRECT answer is (a) Lapply

Easiest EXPLANATION: If the programmers want the output to be a data frame or a vector, then sapply function is USED whereas if the programmer WANTS the output to be a LIST then lapply is used. vapply allows the programmer to specific the output type.
31.

R Commander is used to ___________ in R.(a) Export data(b) Import data(c) Use data(d) Work on dataThe question was posed to me in exam.Question is from Functions in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct option is (b) Import data

Best explanation: R COMMANDER is used to import data in R LANGUAGE. To start the R commander GUI, the user should type in the command Rcmdr into the console. There are 3 DIFFERENT types in which data can be imported in R language.

32.

In the base graphics system, which function is used to add elements to a plot?(a) Boxplot()(b) Text()(c) Boxplot() or Text()(d) Treat()This question was addressed to me in an online interview.I need to ask this question from Functions in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct choice is (c) Boxplot() or Text()

The explanation is: In the base GRAPHICS system, boxplot or text FUNCTION is USED to add ELEMENTS to a plot.

33.

Point out the correct statement?(a) The traceback() function must be called immediately after an error occurs(b) The debugger calls the browser at the very low level of the function body(c) Every time you call the mod() function it will launch the interactive debugger(d) R provides only two tools to help you with debugging your codeThis question was addressed to me in class test.My question is from Debugging Tools topic in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct CHOICE is (a) The traceback() FUNCTION must be called immediately after an error occurs

Easiest EXPLANATION: Once ANOTHER function is called, you LOSE the traceback.

34.

The cumulative frequency distribution of a categorical variable can be checked using the ________ function in R language.(a) Sum(b) Cumsum(c) Lumpsum(d) ResumThe question was asked at a job interview.My question is from Functions topic in chapter Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct answer is (B) Cumsum

For explanation: The CUMULATIVE frequency DISTRIBUTION of a categorical VARIABLE can be checked using the cumsum () FUNCTION in the R language. The frequency distribution of a categorical variable can be checked using the table function in the R language.

35.

Warnings are generated by the _________ function.(a) warning()(b) error()(c) run()(d) message()The question was asked in examination.The question is from Dates and Times in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right answer is (a) warning()

The explanation is: warning is an INDICATION that SOMETHING is WRONG but not NECESSARILY fatal; execution of the function continues.

36.

Point out the correct statement?(a) The search list can be found by using the searchlist() function(b) The search list can be found by using the search() function(c) The global environment or the user’s workspace is always the second element of the search list(d) R has separate namespaces for functions and non-functionsI got this question in quiz.The above asked question is from Scoping Rules in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer» CORRECT answer is (b) The search list can be found by using the search() function

Easy EXPLANATION: Base PACKAGE is ALWAYS the last ELEMENT.
37.

Write the syntax to set the path of the current working directory in R environment?(a) Setwd(“dipath”)(b) Setwd(dir_path)(c) Setwd(“dir_path”)(d) Set(“dir_path”)I had been asked this question in homework.The doubt is from Functions topic in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right answer is (c) Setwd(“dir_path”)

To explain: The CURRENT R working ENVIRONMENT of a user which has user-defined objects like lists, vectors, ETC. is referred to as WORKSPACE in R language. The workspace of R is flexible to all functions of statistics.

38.

Which function is used to create a histogram for visualisation in R programming language?(a) Library(b) Hist(c) Data(d) ReferI got this question at a job interview.I'm obligated to ask this question of Functions topic in chapter Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct answer is (b) Hist

For explanation: Hist function is used to create a HISTOGRAM for visualisation in R programming LANGUAGE. The GENERIC function hist computes a histogram of the given data values. This function takes a VECTOR as the input and also uses some more parameters to PLOT histograms.

39.

____________ is one type of the simplest machine learning classification algorithms that is a subset of supervised learning based on lazy learning.(a) K-Nearest Neighbour(b) Naïve Bayes(c) Travelling Salesman(d) N-QueenThe question was asked in class test.Origin of the question is Functions topic in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The correct option is (a) K-Nearest Neighbour

The BEST EXPLANATION: K-Nearest Neighbour is one type of the simplest machine LEARNING classification algorithms that is a subset of supervised learning based on lazy learning. In this ALGORITHM the function is approximated and also COMPUTATIONS are deferred until classification.

40.

A matrix of scatterplots can be produced using _________ function.(a) Pears(b) Pairs(c) Tears(d) CarsI had been asked this question during an online exam.My doubt stems from Functions topic in division Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct CHOICE is (b) PAIRS

For explanation I would SAY: A MATRIX of scatterplots can be produced using pairs. Pairs function takes various parameters LIKE formula, data, subset, labels, etc.

41.

If a programmer wants the output to be a list then ___________ function is used.(a) Lapply(b) Sapply(c) Vapply(d) ZapplyI got this question during an online interview.I want to ask this question from Functions in division Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right answer is (b) Sapply

The explanation is: sapply() FUNCTION does the same JOBS as lapply() function but RETURNS a VECTOR. We can use a user built-in function into lapply() or sapply(). We create a function named avg to compute the average of the minimum and maximum of the vector.

42.

Which function is difficult to implement?(a) Lapply(b) Japply(c) Vapply(d) ZapplyI have been asked this question at a job interview.I'm obligated to ask this question of Functions in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The correct OPTION is (c) VAPPLY

Easy explanation: Vapply allows the programmer to specific the output type. The disadvantage of USING vapply is that it is verydifficult to be implemented and more verbose. vapply is SIMILAR to sapply, but has a pre-specified type of return VALUE, so it can be safer to use.

43.

__________ function is used in applying a function each level of factors.(a) With()(b) By()(c) To()(d) Here()I had been asked this question during an interview.I would like to ask this question from Functions in division Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer» CORRECT answer is (B) By()

For EXPLANATION: BY () function is used for applying a function each level of factors. R has a large number of in-built functions and also USER can create their own functions. In R, a function is an object. So the R interpreter is able to pass control to the function.
44.

Which package in R supports the exploratory analysis of genomic data?(a) Adegenat(b) Adegenet(c) Adegnet(d) AdezenetThis question was posed to me during a job interview.The doubt is from Functions in chapter Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The correct choice is (b) Adegenet

Explanation: Adegenet package in R supports the EXPLORATORY analysis of genomic data. R has a large number of in-built functions and the user can CREATE their own functions. In R, a FUNCTION is an object so the R INTERPRETER is able to pass control to the function.

45.

__________ is the best way for communicating the results of data analysis using the R language.(a) Single document(b) Files(c) Structures(d) LoadingsI got this question in class test.My question is taken from Functions topic in chapter Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right option is (a) Single document

The best I can explain: The best POSSIBLE way to do this is to COMBINE the data, code and analysis results for a single document by knitr for reproducible RESEARCH. This HELPS others to verify the findings, then engage in discussions.

46.

A function, together with an environment, makes up what is called a ______ closure.(a) formal(b) function(c) reflective(d) symmetryThis question was posed to me by my college director while I was bunking the class.My question is from Scoping Rules topic in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer» RIGHT CHOICE is (b) function

For EXPLANATION: The function closure model can be used to CREATE functions that “carry around” data with them.
47.

____________ package in R language provides various options for re-randomization and permutations based on statistical tests.(a) Coin(b) Vain(c) Join(d) LainI got this question in my homework.This intriguing question originated from Functions topic in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct answer is (a) Coin

To explain I would say: Coin package in R language provides VARIOUS options for re-randomization and permutations based on statistical TESTS. When test assumptions cannot be MET then this package serves as a GOOD ALTERNATIVE to classical methods.

48.

R uses _________ scoping^6 0 or static scoping.(a) reflective(b) transitive(c) lexical(d) closureThis question was posed to me in my homework.The question is from Scoping Rules topic in chapter Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer» RIGHT CHOICE is (c) lexical

The EXPLANATION is: Lexical scoping in R means that the values of free VARIABLES are searched for in the environment in which the function was DEFINED.
49.

______________ measures the probability of the binary response variable in R language.(a) Logical Regression(b) Multivariate Regression(c) Simpler Regression(d) StatisticsThis question was addressed to me by my college professor while I was bunking the class.This is a very interesting question from Functions topic in chapter Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right choice is (a) LOGICAL Regression

For explanation: Logistic regression can be USED for this and the function glm () in R language provides this functionality. Logistic regression is a STATISTICAL METHOD for analysing a dataset in which there are one or more independent variables which determine an outcome.

50.

________ function can be used to add datasets in R provided with the columns in the datasets should be the same.(a) rbind()(b) bbind()(c) jbind()(d) hbind()I have been asked this question in a job interview.This intriguing question comes from Functions topic in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The correct ANSWER is (a) rbind()

The explanation: rbind () function can be used add datasets in R language PROVIDED the columns in the datasets should be the same. R has a LARGE number of in-built FUNCTIONS and also the user can create their own functions.