Data Science for Business With R
1st Edition by Jeffrey S. Saltz
Complete Chapter Test Bank
are included (Ch 1 to 15)
** Immediate Download
** Swift Response
** All Chapters included
,Chapter 1: Begin At The Beginning With R
Test Bank
Multiple Choice
1. Which of the following is true about R?
a. Programming in R is similar as in spreadsheets
b. R is open source
c. You have to pay annual fee to use R
d. R use the exact same code as Phython
Ans: B
Learning Objective: Know how to install the R software package.
Cognitive Domain: Comprehension
Answer Location: Introduction
Difficulty Level: Medium
2. When R is running and it is the active application on your desktop, if you type a
command it appears after the _____ symbol
a. =
b. <
c. >
d. //
Ans: C
Learning Objective: Gain familiarity with using the R command line.
Cognitive Domain: Knowledge
Answer Location: Using R
Difficulty Level: Easy
3. Which of the following codes combines numbers 1, 10, and 100 into a single vector?
a. t(1,10,100)
b. c(1,10,100)
c. rm(1,10,100)
d. vec(1,10,100)
Ans: B
Learning Objective: Gain familiarity with using the R command line.
Cognitive Domain: Application
Answer Location: Creating and Using Vectors
Difficulty Level: Medium
4. From the code below, myFamilyAges is called a(n) ______ in R.
“
myFamilyAges <- c(43, 42, 12, 8, 5)
“
, a. object
b. space
c. answer
d. unit
Ans: A
Learning Objective: Gain familiarity with using the R command line.
Cognitive Domain: Knowledge
Answer Location: Creating and Using Vectors
Difficulty Level: Easy
5. Which of the following codes selects the third, the second, and the fifth elements of
the myFamilyAges vector?
a. myFamilyAges( 3,2,5 )
b. myFamilyAges[ v(3,2,5)]
c. myFamilyAges[ 3,2,5 ]
d. myFamilyAges[ c(3,2,5) ]
Ans: D
Learning Objective: Build and manipulate vectors in R.
Cognitive Domain: Application
Answer Location: Subsetting Vectors
Difficulty Level: Medium
6. Which of the following codes selects a sequential range of values ?
a. c(3,15)
b. c(3:15)
c. c(3-15)
d. c(3 to 15)
Ans: B
Learning Objective: Build and manipulate vectors in R.
Cognitive Domain: Application
Answer Location: Subsetting Vectors
Difficulty Level: Medium
7. You define the object myFamilyAges as
“
myFamilyAges <- c(43, 42, 12, 8, 5)
“
Which of the following codes selects the family members’ age that are older than 21?
a. myFamilyAges [myFamilyAges > 21]
b. myFamilyAges (myFamilyAges > 21)
c. myFamilyAges [> 21]
d. myFamilyAges [myFamilyAges >> 21]
Ans: A
Learning Objective: Build and manipulate vectors in R.
Cognitive Domain: Application
Answer Location: Subsetting Vectors