21ACS482
21ACS482
Q. No Question
1 _____ programming language is a dialect of S.
a) B a) B a) B a) B
2 Which of the following will start the R program?
a) $ R a) $ R a) $ R a) $ R
3 In 1991, R was created by Ross Ihaka and Robert Gentleman in the ______ University.
a) John Hopkins b) California c) Harvard d) Auckland
4 Finally, in _________ R version 1.0.0 was released to the public.
a) 2000 b) 2005 c) 2010 d) 2012
5 Which of the following describes R language?
a) Free b) Paid c) Trial Version d) Testing
6 The copyright for the primary source code for R is held by the ______ Foundation
a) A b) S c) C d) R
7 Which of the following statement is alternative to _________ is? solve
a) help(solve) b) print(solve) c) bind(solve) d) matrix(solve)
8 If a command is not complete at the end of a line, R will display _______ prompt
a) * b) – c) + d) /
9 R has how many atomic classes of objects?
a) 1 b) 2 c) 3 d) 5
10 Numbers in R are generally treated as _______ precision real numbers
a) single b) double c) real d) imaginary
11 If you explicitly want an integer, you need to specify the _____ suffix
a) D b) R c) L d) K
What will be the output of the following R code?
12 > x <- vector ("numeric", length = 10), > x
a) 10 b) 0 0 0 0 0 0 0 0 0 0 c) 01 d) 00120
13 The ________ function can be used to create vectors of objects by concatenating things together
a) cp () b) c () c) concat () d) con ()
Note: (RBTL - Revised Bloom’s Taxonomy Level: CO - Course Outcome: PI - Performance Indicator)
Page 1 of 6
14 A single element of a character vector is referred as_____________
a) Character string b) String c) Data strings d) Raw data
15 R files has an extension ______
a). R b). S c). Rp d) .c
16 The longer programs are called ____________
a) Files b) Structures c) Scripts d) Data
17 In the expression x <- 4 in R, what is the class of ‘x’ as determined by the `class ()’ function?
a) Character b) Numeric c) Integer d) Word
Note: (RBTL - Revised Bloom’s Taxonomy Level: CO - Course Outcome: PI - Performance Indicator)
Page 2 of 6
33 What is the output of the following code: pmin (c (1,2,3), c (3,2,1), c (2,2,2))
a) 1 2 1 b) 2 1 2 c) 1 2 3 d) 3 2 1
34 What is the output of the following code: pmax (c (1,2,3), c(3,2,1), c(2,2,2))
a) List all objects b) Removes all c) Remove current d) None of the
35 ___________________is used to objects object
skip an iteration of a loop.
a) Next b) skip c) group d) cancel
What will be the output of the following R code?
36
>y <- "fruit" > switch (y, fruit = "banana", vegetable = "broccoli", "Neither")
a) “banana” b) “Neither” c) “broccoli” d) Error
What will be the output of the following R code?
37 > x <- 3
> switch (x,2+2, mean(1:10),sum(1:5))
** ** **
Note: (RBTL - Revised Bloom’s Taxonomy Level: CO - Course Outcome: PI - Performance Indicator)
Page 6 of 6