R MCQ

R Quick Quiz

Question 1 of 10
  • What is the output of the following R code? x<-2; y <- c(1:3); paste("The value of x is", x, "and the value of y[x] is", y[x], sep=" ")

    Answer & Explanation

    Correct Answer: "The value of x is 2 and the value of y[x] is 2"

    Note: This Question is unanswered, help us to find answer for this one

  • Let X be a 3x4 matrix with non-zero values. The result of: > apply(X, 2, mean), is:

    Answer & Explanation

    Correct Answer: equal to the result of: >c(mean(X[,1]), mean(X[,2]), mean(X[,3]), mean(X[,4]))

    Note: This Question is unanswered, help us to find answer for this one

  • Which will test the hypothesis that two independent Normally distributed random variables A and B have different means?

    Answer & Explanation

    Correct Answer: t.test( A, B, paired = FALSE )

    Note: This Question is unanswered, help us to find answer for this one

  • Which is INCORRECT regarding the command: T <- 40; rnorm( T, 1, 4) ?

    Answer & Explanation

    Correct Answer: it draws 1 number from 40 different Normal distributions

    Note: This Question is unanswered, help us to find answer for this one

  • Which R function provides basic descriptive summary statistics for a numeric vector x?

    Answer & Explanation

    Correct Answer: summary(x)

    Note: This Question is unanswered, help us to find answer for this one

  • What is the output for the command: > rep( c(1:2), each = 3)

    Answer & Explanation

    Correct Answer: [1] 1 1 1 2 2 2

    Note: This Question is unanswered, help us to find answer for this one

  • What does the following R code output? Y <- c(1,2,3); X <- rep(c(1,length(Y)), times=2); X

    Answer & Explanation

    Correct Answer: 1 3 1 3

    Note: This Question is unanswered, help us to find answer for this one

  • How are these data types alike: logical, integer, numeric, and character?

    Answer & Explanation

    Correct Answer: Each is a type of atomic vector.

    Note: This Question is unanswered, help us to find answer for this one

  • How do you extract the values above the main diagonal from a square matrix named Rmat?

    Answer & Explanation

    Correct Answer: Rmat[upper.tri(Rmat)]

    Note: This Question is unanswered, help us to find answer for this one

  • What is the output of: rrr <- 5.45667; sprintf("%1.f", round(rrr, 3))

    Answer & Explanation

    Correct Answer: "5"

    Note: This Question is unanswered, help us to find answer for this one

  • R Quick Quiz

    battery

    Poor Results!

    You need a lot of improvement.

    Just don't give up!

    Correct Answers: 0/10

    Start Practicing with our MCQs given below.

R MCQs | Topic-wise