Q. Which of the following R syntax is correct for while loop?

  • (A) while ( statement1 ) statement2
  • (B) while ( statement1 ) else statement2
  • (C) while ( statement1 ) do statement2
  • (D) while ( statement2 ) doelse statement2
πŸ’¬ Discuss
βœ… Correct Answer: (A) while ( statement1 ) statement2

Q. Point out the wrong statement?

  • (A) Functions in R are "second class objects"
  • (B) The writing of a function allows a developer to create an interface to the code, that is explicitly specified with a set of parameters
  • (C) Functions provides an abstraction of the code to potential users
  • (D) Writing functions is a core activity of an R programmer
πŸ’¬ Discuss
βœ… Correct Answer: (A) Functions in R are "second class objects"

Q. Which package can be integrated with dplyr for large fast tables?

  • (A) Table
  • (B) Data, dplyr
  • (C) Data.table
  • (D) Dplyr.table
πŸ’¬ Discuss
βœ… Correct Answer: (C) Data.table

Q. Which package in R supports the exploratory analysis of genomic data?

  • (A) Adegenat
  • (B) Adegenet
  • (C) Adegnet
  • (D) Adezenet
πŸ’¬ Discuss
βœ… Correct Answer: (B) Adegenet

Q. 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 right
πŸ’¬ Discuss
βœ… Correct Answer: (A) POSIX represents a portable operating system interface, primarily for UNIX systems

Q. 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 value
πŸ’¬ Discuss
βœ… Correct Answer: (A) Dynamic scoping turns out to be particularly useful for simplifying statistical computations

Q. Which of the following R code can be used to avoid numeric problems such as taking the logarithm of a negative number?

  • (A) if( any(x < 0) ) y <- log(1+x) else y <- log(x)
  • (B) if( any(x <= 0) ) y <- log(1+x) else y <- log(x)
  • (C) if( any(x >= 0) ) y <- log(1+x) else y <- log(x)
  • (D) if( any(x >> 0) ) x >- log(1+x) else x <- log(x)
πŸ’¬ Discuss
βœ… Correct Answer: (B) if( any(x <= 0) ) y <- log(1+x) else y <- log(x)

Q. debug() flags a function for . . . . . . . . mode in R mode.

  • (A) debug
  • (B) run
  • (C) compile
  • (D) recover
πŸ’¬ Discuss
βœ… Correct Answer: (B) run

Q. You can check to see whether an R object is NULL with the . . . . . . . . function.

  • (A) is.null()
  • (B) is.nullobj()
  • (C) null()
  • (D) as.nullobj()
πŸ’¬ Discuss
βœ… Correct Answer: (A) is.null()

Q. What will be the output of the following R expression?
> log(-2.3)

  • (A) Warning in log(-2.3): NaNs produced
  • (B) 1
  • (C) Null
  • (D) 0
πŸ’¬ Discuss
βœ… Correct Answer: (A) Warning in log(-2.3): NaNs produced