0% found this document useful (0 votes)
72 views1 page

MCQS

The document contains 10 multiple choice questions about the R programming language. It tests knowledge of data types in R, the classes of different objects, functions to get information about data frames, valid graphics devices, binding vectors together into matrices, and vector arithmetic. The questions cover fundamental concepts for anyone learning or using R for data science.

Uploaded by

Arsham Maqbool
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views1 page

MCQS

The document contains 10 multiple choice questions about the R programming language. It tests knowledge of data types in R, the classes of different objects, functions to get information about data frames, valid graphics devices, binding vectors together into matrices, and vector arithmetic. The questions cover fundamental concepts for anyone learning or using R for data science.

Uploaded by

Arsham Maqbool
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

BSEF14A050

Arsham Maqbool
Data Science with R
Select the correct answer to following multiple choice questions.

1) The code you write in console can be traced later.


a)True b)False

2) Which of the following (is/are) datatype(s) of R.


a)Vectors b)Data Frames c)Matrices d)All of these

3) To learn data science one must learn


a)R b)Java c)C# d)C++

4) In R language the following are all atomic data types EXCEPT.


a)integer b)logical c)data frame d)character

5) If I execute the expression x <- 4 in R language, what is the class of the object `x as
determined by the `class() function?
a)Numeric b)Integer c)Real d)Complex

6) ______ is function in R to get number of observation in a data frame.


a)n() b)ncols() c)nobs() d)nrow()

7) Which of the following is an example of a valid graphics device in R?


a) A socket b) A Microsoft c) A PDF file d) A file folder
connection Word document

8) If I have two vectors x <- c(1,3, 5) and y <- c(3, 2, 10), what is produced by the
expression rbind(x, y)?
a)A vector of b)A 2 by 3 matrix c)A vector of d)A 2 by 2 matrix
length 3 length 2

9) What is the class of the object defined by the expression x <- c(4, "a", TRUE)?
a)Integer b)Character c)Logical d)Numeric

10) Suppose I have a vector x <- 1:4 and y <- 2:3. What is produced by the expression x
+ y?
a) An integer b) A numeric vector c) A numeric vector d) An error
vector with the with the values 3, 5, with the values 1,
values 3, 5, 5, 7. 3, 4. 2, 5, 7.

You might also like