Q.1
Which of the following statement is invalid?
  • a) x <- c(1+0i, 2+4i)
  • b) x <- c(TRUE, FALSE)
  • c) x <- c(T, F)
  • d) None of the mentioned
Q.2
Point out the correct statement?
  • a) Use explicit TRUE and FALSE values when indicating logical values
  • b) rm command is used to remove objects in R
  • c) R operates on named data structures
  • d) All of the mentioned
Q.3
What will be the output of the following R code? > x <- 6 > class(x)
  • a) “integer”
  • b) “numeric”
  • c) “real”
  • d) “imaginary”
Q.4
What will be the output of the following R code? > x <- 0:6 > as.logical(x)
  • a) FALSE TRUE TRUE TRUE TRUE TRUE TRUE
  • b) “0” “1” “2” “3” “4” “5” “6”
  • c) 0 1 2 3 4 5 6
  • d) 6 5 5 3 2 1
Q.5
Point out the correct statement?
  • a) The usual operator, <-, can be thought of as a syntactic shortcut to expression operation
  • b) Assignment can also be made using the function assignment()
  • c) Vectors can be used in arithmetic expressions, in which case the operations are performed element by element
  • d) seq() is used to delete the numbers
Q.6
Which of the following is invalid assignment?
  • a)
  • b)
  • c)
  • d) None of the mentioned
Q.7
What will be the output of the following R code? > c(10.5.3.6.21.-> x
  • a) -4.02
  • b) 4.02
  • c) NaN
  • d) 3.67
Q.8
Which of the following code constructs vector of length 11?
  • a)
  • b)
  • c)
  • d)
Q.9
_______ function returns a vector of the same size as x with the elements arranged in increasing order.
  • a) sort()
  • b) orderasc()
  • c) orderby()
  • d) sequence()
Q.10
Which of the following is used for generating sequences?
  • a) seq()
  • b) sequence()
  • c) order()
  • d) orderasc()
0 h : 0 m : 1 s