# Introduction to R Programming for Data Science Week 1 Answers

Course Name: Introduction to R Programming for Data Science

These are answers of Introduction to R Programming for Data Science Week 1

### Practice Quiz

#### Q1. Which of the following are examples of predictive analysis? Select two answers.a. Returning a summary of descriptive statistics for data.b. Dashboards.c. Understanding human languages.d. Pandemic trends prediction.

Q2. Which of the following statements about numeric and integer values are true? Select three values.
a. The converted value of a numeric to an integer is always equal to the original numeric value.
b. The converted value of an integer to a numeric is always equal to the original integer value.
c. An integer can be converted to a numeric value.
d. A numeric value can be converted to an integer.

These are answers of Introduction to R Programming for Data Science Week 1

Q3. What is the result of the R expression 4 + 3 * 25?
a. 175
b. 79
c. 74
d. 103

Q4. Which R function saves a workspace to a .RData file?
a. save.data()
b. save.workspace()
c. save.file()
d. save.image()

These are answers of Introduction to R Programming for Data Science Week 1

Q5. In RStudio, which of the following statements about writing code in the File Editor and the Console are true? Select two answers.
a. Only files containing R code can be edited in the File Editor
b. You write code in the Console when you want to try out R commands or to run a few lines of code.
c. Code in the File Editor executes immediately as you type it so you can see the results quickly.
d. You write code, usually for multiple lines of code, in the File Editor and execute them in batch mode.

Q6. 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.
a. Workspaces
b. Files
c. Objects
d. Cells

These are answers of Introduction to R Programming for Data Science Week 1

#### Q1. R can perform several forms of statistical computation. What is an example of hypothesis testing?a. Obtaining a representative subset of data.b. Inferring an unknown mean value of a population from its samples.c. Compute and visualize a correlation matrix among four different variables to see if they are correlated.d. Testing if the mean values of two groups are statistically different.

Answer: d. Testing if the mean values of two groups are statistically different.

Q2. Which of the following data type conversions may be not allowed in R?
a. integer (like 1L or 2L) to numeric
b. character (like `1`, `A`, or `test`) to numeric
c. logical (like TRUE or FALSE) to numeric
d. numeric (like 1 or 2) to integer

Answer: b. character (like `1`, `A`, or `test`) to numeric

These are answers of Introduction to R Programming for Data Science Week 1

Q3. What is the result of the R expression 100 * (5 – 3)?
a. 497
b. 200
c. 500
d. 503

Q4. 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?
a. R variables, functions, and datasets
b. R Workspace
c. R data files
d. R Interpreter

These are answers of Introduction to R Programming for Data Science Week 1

Q5. Which features of RStudio help facilitate code writing? Select two answers.
a. Code auto completion
b. Workspace visualization
c. File Explorer
d. Syntax highlighting