R Programming Questions and Answers – Functions – 5

This set of R Programming Question Paper focuses on “Functions – 5”.

1. ________ 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()
View Answer

Answer: a
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.

2. _________ variables are categorical variables which can hold either string or numeric values.
a) Factor
b) Simpler
c) Function
d) Package
View Answer

Answer: a
Explanation: Factor variables are categorical variables that hold the string or numeric values. Factor variables are used in various types of graphics and particularly for statistical modelling where a correct number of degrees of freedom is assigned to them.

3. What is the memory limit in R for 64 bit system?
a) 8 TB
b) 9TB
c) 10TB
d) 16TB
View Answer

Answer: a
Explanation: 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.
advertisement
advertisement

4. What is the memory limit in R for 32 bit system?
a) 8 TB
b) 9TB
c) 10TB
d) 3GB
View Answer

Answer: d
Explanation: 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.

5. What are the data types in R on which binary operators can be applied?
a) Scalars
b) Matrices
c) Vectors
d) Scalars, Matrices and Vectors
View Answer

Answer: d
Explanation: 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.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. __________ function is used in applying a function each level of factors.
a) With()
b) By()
c) To()
d) Here()
View Answer

Answer: b
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.

7. How do you create log linear models in R language?
a) loglm()
b) logmn()
c) logfn()
d) loghy()
View Answer

Answer: a
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.
advertisement

8. What will be the class of the vector if you concatenate a number and NA?
a) Number
b) Character
c) Integer
d) No class
View Answer

Answer: a
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.

9. ____________ 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-Queen
View Answer

Answer: a
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.
advertisement

10. What will be the class of the vector if you concatenate a number and a character?
a) Number
b) Character
c) Integer
d) No class
View Answer

Answer: b
Explanation: The class of the resulting vector if you concatenate a number and a character is Character class. Decimal values are called numeric in R. It is the default computational data type in R language.

Sanfoundry Global Education & Learning Series – R Programming Language.

Here’s the list of Best Books in R Programming Language .

To practice all questions papers on R Programming, Here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.