Question: Prob 3 . 0 2 Here are some useful operators for taking a quick look at data frames: names Lists the names of the components.
Prob
Here are some useful operators for taking a quick look at data
frames:
names Lists the names of the components.
ncol
Tells how many components there are.
nrow
head
Tells how many lines of data there are.
Prints the rst several lines of the data frame.
Here are some examples of these commands applied to the
CO data frame:
CO fetchDataCO
Called from: fetchDataCO
namesCO
"Plant"
ncolCO
"Type"
"Treatment" "conc"
"uptake"
nrowCO
Prob
headCO
Plant Type Treatment conc uptake
Qn Quebec nonchilled
Qn Quebec nonchilled
Qn Quebec nonchilled
Qn Quebec nonchilled
Qn Quebec nonchilled
Qn Quebec nonchilled
The data frame iris records measurements on owers.
You can read in with
iris fetchDatairis
Called from: fetchDatairis
creating an object named iris.
Use the above operators to answer the following ques
tions.
Which of the following is the name of a column in
iris?
ower Color Species Length
How many rows are there in iris?
How many columns are there in iris?
What is the Sepal.Length in the third row?
Thedata frame mtcars has data on cars from the s
You can read it in with
cars fetchDatamtcars
Called from: fetchDatamtcars
creating an object named cars.
Use the above operators to answer the following ques
tions.
Which of the following is the name of a column in
cars?
carb color size weight wheels
How many rows are there in cars?
How many columns are there in cars?
What is the wt in the second row?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
