R Language quiz questions

R Language interview questions

  • 1.

    What will the following code print ?

    > x <- 0:6
    > as.logical(x)

     

    1. FALSE TRUE TRUE TRUE TRUE TRUE TRUE

    2. “0” “1” “2” “3” “4” “5” “6”

    3. 0 1 2 3 4 5 6

    4. All of the mentioned

    Answer
  • 2.

    What would be the result of following code ?

    > x <- 6
    > class(x)

     

    1. “integer”

    2. “double”

    3. “real”

    4. All of the mentioned

    Answer
  • 3.

    Point out the correct statement :

    1. Use explicit TRUE and FALSE values when indicating logical values

    2. rm command is used to remove objects in R

    3. R operates on named data structures

    4. All of the mentioned

    Answer
  • 4.

    Which of the following statement is invalid ?

    1. x <- c(1+0i, 2+4i)

    2. x <- c(TRUE, FALSE)

    3. x <- c(T, F)

    4. None of the mentioned

    Answer
  • 5.

    ________ function carries out a chi-square test.

    1. chisq.test()

    2. t.test()

    3. prop.test()

    4. fisher.test()

    Answer
  • 6.

    Which of the following is used to view dataset in a spreadsheet-type format ?

    1. Disp()

    2. View()

    3. Seq()

    4. All of the mentioned

    Answer
  • 7.

    Which of the following builds empirical cumulative distribution function ?

    1. ecdf()

    2. cum

    3. cumsum

    4. All of the mentioned

    Answer
  • 8.

    Which of the following is lattice command for producing a scatterplot ?

    1. plot()

    2. lm()

    3. xyplot()

    4. All of the mentioned

    Answer
  • 9.

    Which of the following compute proportions from a contingency table ?

    1. par()

    2. prop.table()

    3. anova()

    4. All of the mentioned

    Answer
  • 10.

    which of the following statement make a mosaic plot ?

    1. histogram()

    2. mosaicplot()

    3. bar()

    4. All of the mentioned

    Answer
  • 11.

    Which of the following groups find the correlation matrix ?

    1. factor.model

    2. col.max(x)

    3. stem

    4. which.max(x)

    Answer
  • 12.

    Which of the following function cross-tabulate tables using formulas ?

    1. table

    2. stem

    3. xtabs

    4. All of the mentioned

    Answer
  • 13.

    Which of the following finds the position of a quantile in a dataset ?

    1. quantile()

    2. barplot()

    3. barchart()

    Answer
  • 14.

    Which of the following method make vector of repeated values ?

    1. rep()

    2. data()

    3. view()

    4. All of the mentioned

    Answer
  • 15.

    The ___ function can be used to create vectors of objects by concatenating things together.

    1. cp()

    2. c()

    3. concat()

    4. None of the mentioned

    Answer
  • 16.

    What would be the result of following code ?

    > x <- vector("numeric", length = 10)
    > x

     

    1. 10

    2. 0 0 0 0 0 0 0 0 0 0

    3. 01

    4. None of the mentioned

    Answer
  • 17.

    Which of the following can be considered as object attribute ?

    1. dimensions

    2. class

    3. length

    4. All of the mentioned

    Answer
  • 18.

    R objects can have attributes, which are like ________ for the object.

    1. metadata

    2. features

    3. expression

    4. None of the mentioned

    Answer
  • 19.

    Attributes of an object (if any) can be accessed using the ______ function.

    1. objects()

    2. attrib()

    3. attributes()

    4. All of the mentioned

    Answer
  • 20.

    Point out the correct statement :

    1. The value NaN represents undefined value

    2. Number Inf represents infinity in R

    3. NaN can also be thought of as a missing value

    Answer

© 2017 QuizBucket.org