introduction to r programming for data science coursera answers week 1

Practice Quiz

1. Which of the following are examples of predictive analysis? Select two answers.

  • Pandemic trends prediction.

  • Understanding human languages.

  • Returning a summary of descriptive statistics for data.
  • Dashboards.

 

2. Which of the following statements about numeric and integer values are true? Select three values.

  • A numeric value can be converted to an integer.

  • An integer can be converted to a numeric value.

  • The converted value of a numeric to an integer is always equal to the original numeric value.
  • The converted value of an integer to a numeric is always equal to the original integer value.

3. What is the result of the R expression 4 + 3 * 25?

  • 79
  • 175
  • 74
  • 103

4. Which R function saves a workspace to a .RData file?

  • save.data()
  • save.workspace()
  • save.image()
  • save.file()

5. In RStudio, which of the following statements about writing code in the File Editor and the Console are true? Select two answers.

  • You write code, usually for multiple lines of code, in the File Editor and execute them in batch mode.

  • Code in the File Editor executes immediately as you type it so you can see the results quickly.
  • Only files containing R code can be edited in the File Editor
  • You write code in the Console when you want to try out R commands or to run a few lines of code.

 

6. Complete the statement: A Jupyter Notebook is made up of a series of _______________ that you can use to write, run, and interact with your code.

  • Files
  • Cells
  • Objects
  • Workspaces

Graded Quiz

7. R can perform several forms of statistical computation. What is an example of hypothesis testing?

  • Testing if the mean values of two groups are statistically different.
  • Inferring an unknown mean value of a population from its samples.
  • Obtaining a representative subset of data.
  • Compute and visualize a correlation matrix among four different variables to see if they are correlated.

8. Which of the following data type conversions may be not allowed in R?

  • integer (like 1L or 2L) to numeric
  • numeric (like 1 or 2) to integer
  • logical (like TRUE or FALSE) to numeric
  • character (like `1`, `A`, or `test`) to numeric

9. What is the result of the R expression 100 * (5 – 3)?

  • 200
  • 497
  • 503
  • 500

10. After you write code in an R script file or the R Console, what component of the R environment parses the code into objects in memory?

  • R Workspace
  • R Interpreter
  • R data files
  • R variables, functions, and datasets

11. Which features of RStudio help facilitate code writing? Select two answers.

  • File Explorer
  • Code auto completion

  • Syntax highlighting

  • Workspace visualization

 

12. True or False: Execution order does not matter when executing cells in a Jupyter notebook

  • True
  • False

Leave a Reply