Skip to content

Instantly share code, notes, and snippets.

@mGalarnyk
Created March 5, 2017 22:55
Show Gist options
  • Save mGalarnyk/8ef51577975e0700b8dc848c2b650003 to your computer and use it in GitHub Desktop.
Save mGalarnyk/8ef51577975e0700b8dc848c2b650003 to your computer and use it in GitHub Desktop.
Exploratory Data Analysis Quiz 1 (Week 1) JHU Coursera for github repo https://github.com/mGalarnyk/datasciencecoursera

Exploratory Data Analysis Quiz 1 (JHU) Coursera

Question 1

Which of the following is a principle of analytic graphics?

  • Make judicious use of color in your scatterplots (NO)

  • Don't plot more than two variables at at time (NO)

  • Show box plots (univariate summaries) (NO)

  • Only do what your tools allow you to do (NO)

  • Show comparisons

Answer Options:
Integrate multiple modes of evidence
Show comparisons

Question 2

What is the role of exploratory graphs in data analysis?

  • They are made for formal presentations.

  • Only a few are constructed.

  • They are typically made very quickly.

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

Answer Options:
They are typically made very quickly.

Question 3

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

  • Plots are typically created with a single function call

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

  • Plots are created and annotated with separate functions

  • The system is most useful for conditioning plots

Answer Options:
Plots are created and annotated with separate functions

Question 4

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

  • A file folder (NO)

  • The computer screen

  • A Microsoft Word document (NO)

  • A socket connection (NO)

  • The keyboard (NO)

Answer Options:
The computer screen
A PNG file

Question 5

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

  • GIF

  • TIFF

  • Postscript

  • PNG

  • JPEG

Answer Options:
Postscript or SVG

Question 6

Bitmapped file formats can be most useful for

  • Plots that require animation or interactivity

  • Scatterplots with many many points

  • Plots that may need to be resized

  • Plots that are not scaled to a specific resolution

Answer:
Scatterplots with many many points

Question 7

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

  • hist()

  • plot()

  • text()

  • boxplot()

Answer Options:
text() or points()

Question 8

Which function opens the screen graphics device on Windows?

  • postscript()

  • windows()

  • jpeg()

  • xfig()

Answer:
windows()

Question 9

What does the 'pch' option to par() control?

  • the size of the plotting symbol in a scatterplot

  • the plotting symbol/character in the base graphics system

  • the orientation of the axis labels on the plot

  • the line width in the base graphics system

Answer:
the plotting symbol/character in the base graphics system

Question 10

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

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

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

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

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment