R Language quiz questions

R Language interview questions

  • 1.

    Which of the following code create n samples of size “size” with probability prob from the binomial ?

    1. z <- rinom(n,size,prob)

    2. z <- rbinom(n,size,prob)

    3. z <- binom(n,size,prob)

    4. All of the mentioned

    Answer
  • 2.

    ___________ is used to determine what is plotted for each group.

    1. panel.expose

    2. panel.impose

    3. panel.superpose

    4. All of the mentioned

    Answer
  • 3.

    Logical flag is applicable to which of the following plots ?

    1. scatterplot

    2. dotplot

    3. xyplot

    4. All of the mentioned

    Answer
  • 4.

    What is a geom in the ggplot2 system ?

    1. a plotting object like point, line, or other shape

    2. a method for making conditioning plots

    3. a method for mapping data to attributes like color and size

    4. a statistical transformation

    Answer
  • 5.

    For barchart and _________, non-trivial methods exist for tables and arrays, documented at barchart.table.

    1. scatterplot

    2. dotplot

    3. xyplot

    4. All of the mentioned

    Answer
  • 6.

    What is ggplot2 an implementation of ?

    1. the Grammar of Graphics developed by Leland Wilkinson

    2. 3D visualization system

    3. the S language originally developed by Bell Labs

    4. the base plotting system in R

    Answer
  • 7.

    which of the following functions can be used to finely control the appearance of all lattice plots ?

    1. par()

    2. print.trellis()

    3. splom()

    4. trellis.par.set()

    Answer
  • 8.

    ____________ produces one-dimensional scatterplots.

    1. xyplot

    2. stripplot

    3. barchart

    4. bwplot

    Answer
  • 9.

    Annotation of plots in any plotting system involves adding points, lines, or text to the plot, in addition to customizing axis labels or adding titles. Different plotting systems have different sets of functions for annotating plots in this way. Which of the following functions can be used to annotate the panels in a multi-panel lattice plot?

    1. points()

    2. panel.abline()

    3. lines()

    4. axis()

    Answer
  • 10.

    __________ produces bivariate scatterplots or time-series plots.

    1. xyplot

    2. dotplot

    3. barchart

    4. bwplot

    Answer
  • 11.

    __________ produces box-and-whisker plots.

    1. xyplot

    2. dotplot

    3. barchart

    4. bwplot

    Answer
  • 12.

    If I want to save a plot to a PDF file, which of the following is a correct way of doing that?

    1. Construct the plot on the screen device and then copy it to a PDF file with dev.copy2pdf()

    2. Construct the plot on the PNG device with png(), then copy it to a PDF with dev.copy2pdf().

    3. Open the PostScript device with postscript(), construct the plot, then close the device with dev.off().

    4. Open the screen device with quartz(), construct the plot, and then close the device with dev.off().

    Answer
  • 13.

    What does the ‘pch’ option to par() control ?

    1. the size of the plotting symbol in a scatterplot

    2. the line width in the base graphics system

    3. the orientation of the axis labels on the plot

    4. the plotting symbol/character in the base graphics system

    Answer
  • 14.

    Which function opens the screen graphics device for the Mac ?

    1. bitmap()

    2. quartz()

    3. pdf()

    4. png()

    Answer
  • 15.

    Which of the following functions is typically used to add elements to a plot in the base graphics system?

    1. lines()

    2. hist()

    3. plot()

    4. boxplot()

    Answer
  • 16.

    Bitmapped file formats can be most useful for

    1. Plots that may need to be resized

    2. Plots that require animation or interactivity

    3. Plots that are not scaled to a specific resolution

    4. Scatterplots with many many points

    Answer
  • 17.

    Which of the following is an example of a vector graphics device in R?

    1. JPEG

    2. PNG

    3. GIF

    4. SVG

    Answer
  • 18.

    Which of the following is an example of a valid graphics device in R?

    1. A socket connection

    2. A Microsoft Word document

    3. A PDF file

    4. A file folder

    Answer
  • 19.

    Which of the following is true about the base plotting system ?

    1. Margins and spacings are adjusted automatically depending on the type of plot and the data

    2. Plots are typically created with a single function call

    3. Plots are created and annotated with separate functions

    4. The system is most useful for conditioning plots

    Answer
  • 20.

    What is the role of exploratory graphs in data analysis ?

    1. They are made for formal presentations.

    2. They are typically made very quickly.

    3. Axes, legends, and other details are clean and exactly detailed.

    4. They are used in place of formal modeling.

    Answer

© 2017 QuizBucket.org