R Language quiz questions

R Language interview questions

  • 1.

    _________ ensures reproducibility of the sequence of random numbers.

    1. sets.seed()

    2. set.seed()

    3. set.seedvalue()

    4. All of the mentioned

    Answer
  • 2.

    What will be the output of the following code ?

     > pnorm(2)

     

    1. 0.9772499

    2. 1.9772499

    3. 0.6772499

    4. All of the mentioned

    Answer
  • 3.

    What will be the output of the following code ?

    > x <- rnorm(10)
    > summary(x)

     

    1. [1] 0.01874617 -0.18425254 -1.37133055 -0.59916772 0.29454513
      [6] 0.38979430 -1.20807618 -0.36367602 -1.62667268 -0.25647839
    2. [1] 22.20356 21.51156 19.52353 21.97489 21.48278 20.17869 18.09011
      [8] 19.60970 21.85104 20.96596
    3. Min. 1st Qu. Median Mean 3rd Qu. Max.
      18.09 19.75 21.22 20.74 21.77 22.20
    4. All of the mentioned

    Answer
  • 4.

    What will be the output of the following code ?

    > x <- rnorm(10)
    > x

     

    1. [1] 0.01874617 -0.18425254 -1.37133055 -0.59916772 0.29454513
      [6] 0.38979430 -1.20807618 -0.36367602 -1.62667268 -0.25647839
    2. [1] 22.20356 21.51156 19.52353 21.97489 21.48278 20.17869 18.09011
      [8] 19.60970 21.85104 20.96596
    3. Min. 1st Qu. Median Mean 3rd Qu. Max.
      18.09 19.75 21.22 20.74 21.77 22.20
    4. All of the mentioned

    Answer
  • 5.

    _________ is the most common probability distribution to work with.

    1. Gaussian

    2. Parametric

    3. Paradox

    4. All of the mentioned

    Answer
  • 6.

    Which of the following evaluate the Normal probability density (with a given mean/SD) at a point ?

    1. dnorm

    2. rnorm

    3. pnorm

    4. rpois

    Answer
  • 7.

    Point out the wrong statement :

    1. For each probability distribution there are typically three functions

    2. For each probability distribution there are typically four functions

    3. r function is sufficient for simulating random numbers

    4. None of the mentioned

    Answer
  • 8.

    _______ generate random Poisson variates with a given rate

    1. dnorm

    2. rnorm

    3. pnorm

    4. rpois

    Answer
  • 9.

    ______ evaluate the cumulative distribution function for a Normal distribution

    1. dnorm

    2. rnorm

    3. pnorm

    4. rpois

    Answer
  • 10.

    Point out the correct statement :

    1. R comes with a set of pseudo-random number generators

    2. Random number generators cannot be used to model random inputs

    3. Statistical procedure does not require random number generation

    4. All of the mentioned

    Answer
  • 11.

    ________ generate random Normal variates with a given mean and standard deviation

    1. dnorm

    2. rnorm

    3. pnorm

    4. rpois

    Answer
  • 12.

    The recover() function will first print out the function call stack when an _______ occurs.

    1. Error

    2. Warning

    3. Messages

    4. All of the mentioned

    Answer
  • 13.

    What would be the output of the following code ?

    > mean(x)
      Error in mean(x) : object 'x' not found
    > traceback()

     

    1. 1: mean(x)

    2. Null

    3. 0

    4. None of the mentioned

    Answer
  • 14.

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

    1. debug

    2. run

    3. compile

    4. All of the mentioned

    Answer
  • 15.

    ______ suspends the execution of a function wherever it is called and puts the function in debug mode

    1. debug()

    2. trace()

    3. recover()

    4. browser()

    Answer
  • 16.

    _______ allows you to modify the error behavior so that you can browse the function call stack

    1. debug()

    2. trace()

    3. recover()

    4. All of the mentioned

    Answer
  • 17.

    Point out the correct statement :

    1. The traceback() function must be called immediately after an error occurs

    2. The debugger calls the browser at the very low level of the function body

    3. Every time you call the mod() function it will launch the interactive debugger

    4. None of the mentioned

    Answer
  • 18.

    ________ allows you to insert debugging code into a function a specific places

    1. debug()

    2. trace()

    3. browser()

    4. All of the mentioned

    Answer
  • 19.

    Which of the following is primary tool for debugging ?

    1. debug()

    2. trace()

    3. browser()

    4. All of the mentioned

    Answer
  • 20.

    Point out the wrong statement :

    1. The primary task of debugging any R code is correctly diagnosing what the problem is

    2. R provides only two tools to help you with debugging your code

    3. print statement can be used for debugging purpose

    4. All of the mentioned

    Answer

© 2017 QuizBucket.org